how to pass a double type variable to paint function from the init function.
string variable is possible..
my question is double variable is possible or not...
replay me
When i use javac the applet gets compiled without any error but when I run the appletviewer BlanksApplet.html I get error applet not initialized but it runs in google chrome.my code is like this:
import java.awt.*;
public class BlanksApplet extends javax.swing.JApplet {
String parameter1;
String parameter2;
String parameter3;
public void init() {
parameter1 = getParameter("adjective1");
parameter2 = getParameter("adjective2");
parameter3 = getParameter("adjective3");
}
public void paint(Graphics s) {
s.drawString("The " + parameter1
+ " " + parameter2 + " fox "
+ "jumped over the "
+ parameter3 + " dog.", 5, 50);
}
}
for the .java part and for the .html part I am using this code:
<applet code =" BlanksApplet.class" height = 200 width = 500>
<param name ="adjective1" value ="lappy">
<param name ="adjective2" value ="mouse">
<param name ="adjective3" value ="keyboard">
</applet>
Some body help me........
javachinmaya kumar bhatta March 7, 2012 at 5:31 PM
Click executes the file
Open with TextEdit executes the file
Ctrl click executes the file
Open executes the file
I jut wanna view/edit it but can't figure out "how".
Whats the secret>
Thanks
John
i got the error as below
C:\Program Files\Java\jdk1.7.0\bin>appletviewer be.java
java.lang.NullPointerException
at be.init(be.java:15)
at sun.applet.AppletPanel.run(AppletPanel.java:435)
at java.lang.Thread.run(Thread.java:674)
Run the applet programpankaj March 29, 2011 at 11:16 AM
who to run the applet the program
thanx a lot!abdul naser April 8, 2011 at 7:47 PM
thank u very much... it helped me...
java appletvanita June 22, 2011 at 12:21 PM
know about java applet programs
passin argument in appletJasim kuttiyil July 29, 2011 at 4:07 PM
how to pass a double type variable to paint function from the init function. string variable is possible.. my question is double variable is possible or not... replay me
thanksharshavardhan September 22, 2011 at 8:44 AM
hi dude thanks a lot after 1hr trying with various methods u'r is the only one which worked...thanku
java Omprakash December 11, 2011 at 11:02 AM
How to run awt class program? how to create butto in java?
javaganesh January 28, 2012 at 4:41 PM
good site for computer
questionsheela January 10, 2013 at 9:06 PM
hai sir, i want calculate used in applet viewer program, pls send my email.........
RMIvivek January 19, 2013 at 11:23 AM
is there someone ,who can guide me through the RMI program and help me in showing the how it runs.... thanks
programmingMuhammad Fayyaz February 14, 2012 at 7:39 PM
for good internet programming
computer ScienceMuhammad Fayyaz February 14, 2012 at 7:41 PM
for better programming on internet
Error in appletviewerArindam February 27, 2012 at 1:29 PM
When i use javac the applet gets compiled without any error but when I run the appletviewer BlanksApplet.html I get error applet not initialized but it runs in google chrome.my code is like this: import java.awt.*; public class BlanksApplet extends javax.swing.JApplet { String parameter1; String parameter2; String parameter3; public void init() { parameter1 = getParameter("adjective1"); parameter2 = getParameter("adjective2"); parameter3 = getParameter("adjective3"); } public void paint(Graphics s) { s.drawString("The " + parameter1 + " " + parameter2 + " fox " + "jumped over the " + parameter3 + " dog.", 5, 50); } } for the .java part and for the .html part I am using this code: <applet code =" BlanksApplet.class" height = 200 width = 500> <param name ="adjective1" value ="lappy"> <param name ="adjective2" value ="mouse"> <param name ="adjective3" value ="keyboard"> </applet> Some body help me........
javachinmaya kumar bhatta March 7, 2012 at 5:31 PM
what is applet viewer ?
I HAVE A DOUBTANKIT March 1, 2012 at 4:54 PM
after appletviewer filename.html the applet is not running what to do now plz help
compro2leynil pascual March 12, 2012 at 11:24 AM
hello sir/mam i want to ask can we run our applet on browser if it also contains swings companent also plz tell me????????///
applet viewer.htmlnaresh March 21, 2012 at 9:07 PM
when the result i see compand prompt or jcreator
Cant't just view applet,html fileJohn Reynolds May 14, 2012 at 10:09 PM
Click executes the file Open with TextEdit executes the file Ctrl click executes the file Open executes the file I jut wanna view/edit it but can't figure out "how". Whats the secret> Thanks John
applets viewer are not loadedjitesh August 27, 2012 at 9:42 PM
i got the error as below C:\Program Files\Java\jdk1.7.0\bin>appletviewer be.java java.lang.NullPointerException at be.init(be.java:15) at sun.applet.AppletPanel.run(AppletPanel.java:435) at java.lang.Thread.run(Thread.java:674)
Rajshahi,Bangladesh.MD. Parvez Mosaraf September 2, 2012 at 10:07 PM
Thank you web Developer .
questmani October 23, 2012 at 7:22 PM
how to run applet program using applet viewer command.....?
javaanil March 8, 2013 at 10:22 AM
what is syncronzation and explain withexample
javaanil March 8, 2013 at 10:25 AM
applet
Post your Comment