Guess What ... it worked ......
Thanks loads ... but 1 little question ... when i complie the code... instead of manually copy pasting it to my WEBAPP folder.. can i give it as a path (like /myproject/src/main/webapp/HelloWorld.class) ... And thank u to every1 who helped me out..... :handshake::handshake::handshake: MartinM wrote: > > COmpile HelloWorld.java applet into HelloWorld.class and put it into > the webapp directory and write: > > <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25> > </APPLET> > </BODY> > </HTML> > > > 2009/12/9 local_shamil <[email protected]>: >> >> Ok cool the image works fine... >> >> i just added this and it came out " Picture.JPG " >> >> now i need to insert an applet .. >> >> this is my HelloWorld.java code >> >> >> import java.applet.Applet; >> import java.awt.Graphics; >> >> public class HelloWorld extends Applet { >> public void paint(Graphics g) { >> g.drawString("Hello world!", 50, 25); >> } >> } >> >> and my HelloWolrd.HTML code >> >> <HTML> >> <HEAD> >> <TITLE> A Simple Program </TITLE> >> </HEAD> >> <BODY> >> >> Here is the output of my program: >> <APPLET CODE="HelloWorld.class" WIDTH=150 HEIGHT=25> >> </APPLET> >> </BODY> >> </HTML> >> >> and i have entered these 2 in the "COM.MYCOMPANY" Package.... but in your >> applet code it says >> >> <APPLET CODE="XXYYZ.class" archive="/xyz.jar" >> WIDTH=600 HEIGHT=600> >> </APPLET> >> >> What does archive="/xyz.jar" do ?? should i create a jar of my >> HelloWorld.java class and have it in the WEBAPP folder ?? >> >> >> >> >> >> >> >> MartinM wrote: >>> >>>> Guys i am a bit confused now... >>> >>> Take it slow :) >>> >>>> I am trying to have an Applet displayed in a wicket website... >>> >>> That's fine. It is just like displaying an IMAGE in a html page. The >>> applet has nothing to do with wicket. >>> >>>> should i create a JAR as HelloWorld.jar and put it in to the WEBAPP >>>> folder >>> >>> NO. >>> >>> Just make a quickstart WORK and try to make IMAGE ( ) work with >>> the image in webapp/ directory. >>> >>> Then put your applet.class file into the webapp/directory and add the >>> <applet> html tag next to your tag. >>> >>> Restart if necessary. Furthermore: it should work even from file >>> system without wicket running. Remember: applet has nothing to do with >>> wicket. >>> >>> ** >>> Martin >>>> MartinM wrote: >>>>> >>>>> The jar is a library for the applet code. Baybe you do not need it. >>>>> >>>>> ** >>>>> Martin >>>>> >>>>> 2009/12/9 local_shamil <[email protected]>: >>>>>> >>>>>> Ok... this is the code i used to create my Maven Wicket project >>>>>> >>>>>> " mvn archetype:create -DarchetypeGroupId=org.apache.wicket >>>>>> -DarchetypeArtifactId=wicket-archetype-quickstart >>>>>> -DarchetypeVersion=1.4.3 >>>>>> -DgroupId=com.mycompany -DartifactId=myproject " >>>>>> >>>>>> and i used the above example to create >>>>>> http://journals.ecs.soton.ac.uk/java/tutorial/getStarted/applet/index.html >>>>>> my applet >>>>>> >>>>>> So what i did was i added the "HelloWorld.java" and "HelloWorld.html" >>>>>> file >>>>>> in the com.mycompany pakage.. >>>>>> >>>>>> have i done correctly up to this point ?? >>>>>> >>>>>> then i dont undestand what archive="/xyz.jar" that u have quoted in >>>>>> your >>>>>> reply ... Should i have to create a HelloWorl.jar file and have it in >>>>>> the >>>>>> com.mycompany package ?? >>>>>> >>>>>> Please help ... :( :( >>>>>> -- >>>>>> View this message in context: >>>>>> http://old.nabble.com/Very-Basic-Hello-World---Applet-tp26712682p26712974.html >>>>>> Sent from the Wicket - User mailing list archive at Nabble.com. >>>>>> >>>>>> >>>>>> --------------------------------------------------------------------- >>>>>> To unsubscribe, e-mail: [email protected] >>>>>> For additional commands, e-mail: [email protected] >>>>>> >>>>>> >>>>> >>>>> --------------------------------------------------------------------- >>>>> To unsubscribe, e-mail: [email protected] >>>>> For additional commands, e-mail: [email protected] >>>>> >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Very-Basic-Hello-World---Applet-tp26712682p26713212.html >>>> Sent from the Wicket - User mailing list archive at Nabble.com. >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: [email protected] >>>> For additional commands, e-mail: [email protected] >>>> >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Very-Basic-Hello-World---Applet-tp26712682p26713627.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > -- View this message in context: http://old.nabble.com/Very-Basic-Hello-World---Applet-tp26712682p26713959.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
