hi there,can somebody please help me out with the following problems: 1.)i made a JApplet and incorporated some buttons in it,but my problem is that when i load the applet the buttons are not displayed on it automatically,they appear only when i scroll my mouse over the geometric region where the buttons are supposed to be displayed.why is this so?(i am using contentpane and set the layout to null) 2.)i am unable to load the applet in a browser(it works fine with appletviewer),on trying to load it in the browser i get a NoClassFoundError in javax/swing/JApplet,i checked and found that the JApplet class file is there in the specified path but still it gives me this error.BTW i am trying to draw a network in the applet and the co-ords for the network are being read from a txt file using filereader.but it seems that the function doesnt work when i load the applet using a browser..can u please tell me why.. please help me out with this. thanks a ton in advance...
Originally posted by Manfred Leonhardt: Hi Karan, As a first step, you must have a plug-in to run Swing in any browser. Once you get that installed your applet should work better. Regards, Manfred.
hi manfred, thanx a lot for the prompt response..where can i get the plugin and what is its name?when i searched for swing in my jdk directory all ai could see were 2 folders one being SwingApplet and other SwingSet2,but both of these were demo..what do i do..please help... thanks again karan
hi manfred, thaks again for the prompt reply.actually i am able to load the applet in the browser but as i said i am trying to draw a network in my applet and input is read from text files.so the problem is that when i use applet viewer the network is drawn fine but when i try loading the applet using browser then the applet shows up with buttons and all but the network is not drawn.is it because its not able to get the input from the files?the path for the input text files is of my hard disc.also please tell me why do the buttons show up only on scrolling my mouse over the region where they are supposed to show up and not automatically..one last thing i have the java runtime environment installed in my comp so do i still need the jdk plugin because the appplet works fine in an appletviewer(except the buttons not showing automatically)... thanks a million in anticipation karan
Hi Karan, The plug-in is for Netscape or IE it has nothing to do with what is installed on your computer or the appletviewer which is included with JDK. If you want Netscape or IE to execute your applet using JDK1.2 then you do need the plug-in. Applets have severe restrictions on them and in order to get around them you need to create a signed applet. The following article is informative. http://developer.java.sun.com/developer/technicalArticles/Security/Signed/ Regards, Manfred.
hi manfred, thanks a lot for the reply..i downloaded the jdk 1.2 plugin for IE and i also read the link that u sent me regarding signed applets.but i think that i dont need to make a signed applet,all i need is that when i execute my applet in IE then it should be able to read the input data from the text files(residing in my hard disc) and taking that data it should draw the desired network.and from reading the link article as far as i understood a signed applet is about making a secure applet,ie,managing the sensitive data on the server.please advise me on how to achieve what i want to achieve and correct me if i am wrong anywhere.. ur help is highly appreciated karan
hi manfred,all the problems are solved now because i used a html converter to convert the html file for the applet and now it downloads the jdk plugin from the sun site evrytime that its loaded in a browser and hence the applet works fine..now there is just one problem for which i need some help.and the problem is that why are the buttons in the JApplet no being displayed automatically,ie,why do they show up only when i scroll my mous over that region in which they were supposed to be shown..kindly help me out.. thanks a ton regards karan
An elephant? An actual elephant. Into the apartment. How is the floor still here. Hold this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss