vikram kamath c

Greenhorn
+ Follow
since Jun 20, 2009
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vikram kamath c

i am new to j2me and modified the mmapi code to take snapshots at 6 seconds intervals . on the emulator it asks for permission to take snapshot once and takes all the snapshot but on the phone it asks every time . what should be done to avoid the pop up every time . ... Thanks ..... i have even signed the applet (using net beans ide 6.5,sony ericson )
14 years ago
i have an applet and i want to convert it into a servlet as in i want to do the computation on the server ..... is it possible ...... what are the steps
14 years ago
no error on java console/applet.....the threads don't start at all on the browser ..... the program just ignores the threads ... do i have to import any libraries (i have given class implements runnable )....but curiously it works fine in applet viewer....
now the applet works fine in applet viewer simultaneous function call but does not work for browser even after signing .... help
I have 4 functions

function1() function2() function3() function4() called in init()

how do i call them simultaneously without editing major part of the code

Please help .... i know it involves threads but i am not able to implement it right

Thanks
How do i see that? i did not understand. its not in server just clicking on the HTML file of the applet during loading.THANKS
14 years ago
i see 20.mid loading through the console(for html).but does not come .As i Said before it works fine in APPLET VIEWER but not in HTML only thanks.
14 years ago
import java.applet.*;
import java.awt.*;
import java.awt.event.*;

public class PlaySoundApplet1 extends Applet implements ActionListener{
Button play,stop;
AudioClip audioClip;

public void init(){
play = new Button(" Play in Loop ");
add(play);
play.addActionListener(this);
stop = new Button(" Stop ");
add(stop);
stop.addActionListener(this);
audioClip = getAudioClip(getCodeBase(), "20.mid");
}

public void actionPerformed(ActionEvent ae){
Button source = (Button)ae.getSource();
if (source.getLabel() == " Play in Loop "){
audioClip.play();
}
else if(source.getLabel() == " Stop "){
audioClip.stop();
}
}
}

is my code
it works on applet viewer but not on html please help
14 years ago
can you suggest how to use Oleg's code for my program .i don't have much knowledge about threads Thank you Oleg,Thank you Ulf dittmer i have 5 methods which use run like the one i showed in the third thread .thanks .....
14 years ago
i found out the problem.its just that by default the images are renamed to capitals on the server only the extension *.GIF so i had to change them.they are working now . i will change all the images and reply if i need help .thanks a lot
14 years ago
this is what i use
for(i=0;i<20;i++)
# try {
# URL yahoo[i] = new URL(getMUrl());
# URLConnection yc = yahoo[i].openConnection();
# BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
# String inputLine;
#
# while ((inputLine = in.readLine()) != null)
# System.out.println(inputLine);
# in.close();
# } catch (Exception e) {
# e.printStackTrace();

something like this but with many methods to call separate domains
please help
14 years ago
i use the code on the top with a for loop .i think what you have given is almost the same as i use can i make it faster by opening connections simultaneously to many sites not one after the other so time is saved is it possible to do that
,,, thanks in advance
14 years ago
my appet opens many url connections and reads data from it . it is very slow is there a way to make it fast
URL url = null;
url2[q] = "http://www.url.com";
fileToRead=url[q];
try{
url = new URL(getCodeBase(), fileToRead);
}
catch(MalformedURLException e){}

try{
InputStream in = url.openStream();
BufferedReader bf = new BufferedReader(new InputStreamReader(in));
strBuff1 = new StringBuffer();
String inputLine,m="";
int k=0,c=0;
while ((inputLine = bf.readLine()) != null)
{}
.....
........
........

can i open many connections simutaneuosly i am using a for loop to open connections

please help
thanks
14 years ago
public Image i1;
i1=getImage(getDocumentBase(),"dr1.gif");
g.drawImage(i1,300,50,400,400,this);

this is how i do it for all images put in the dame directory

same error occurs even if they are inside a jar file or loaded as parameters ...
i think its because there are too many?
please help
14 years ago
i have signed my applets all the classses /java files in a file game.jar then i loaded them on a web page ...... they work fine on my comp but give these errors
at java.lang.SecurityManager.checkConnect(Unknown Source)
at sun.plugin2.applet.Applet2SecurityManager.checkConnect(Unknown Source)
at sun.awt.image.URLImageSource.checkSecurity(Unknown Source)
at sun.awt.image.ToolkitImage.getWidth(Unknown Source)
at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
at sun.java2d.SunGraphics2D.drawImage(Unknown Source)
at avatar$DrawOn.paintComponent(avatar.java:112)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintChildren(Unknown Source)
at javax.swing.JComponent.paint(Unknown Source)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paintDoubleBuffered(Unknown Source)
at javax.swing.RepaintManager$PaintManager.paint(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)


i dont understand why is this? and why even after signing

<applet code=*****.class codebase="." archive="jarfile.jar" width=500 height=500>
</applet>

i have all the images and audio files(wav) in the same folder i have given all permission for url ,dirctory through my policy file also


please help

14 years ago