Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Applets
Search Coderanch
Advance search
Google search
Register / Login
Forums
Register
Login
Java
»
Applets
Creating a simple applet
Anjali S Sharma
,
Ranch Hand
Sep 20, 2007 05:55:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
I am trying to create a simple
applet
. here is my code
import java.applet.Applet; public class src extends Applet { public src() { } public void init() { } public void start() { try { (new src()).upload(); } catch(Exception e) { e.printStackTrace(); } } public void upload() { System.out.println("upload"); } }
and here is the
JSP
used for referring it
<APPLET CODE="com.src" WIDTH="400" HEIGHT="200"> <PARAM NAME="SPEED" VALUE="100"> <PARAM NAME="IMAGE1" VALUE="thisimage.gif"> <PARAM NAME="IMAGE2" VALUE="thatimage.jpg"> </APPLET>
but it is not working. Please tell me how to make it work
[ September 20, 2007: Message edited by: Anjali S Sharma ]
Ulf Dittmer
,
Rancher
Sep 20, 2007 11:09:00
(0 cow)
(0 skulls)
+Pie
Number of slices to send:
Send
but it is not working.
What does this mean? What is or isn't working according to your expectations?
You should
never put a constructor in an applet. The browser will construct the applet for you.
Post by:
autobot
Put a gun against his head, pulled my trigger, now he's dead, that tiny ad sure bled
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
This thread has been viewed 582 times.
Similar Threads
Can't accept parameters from an applet
Cache Problem
WebPage to Applet to WebPage to Java
passing parameter to applet
very very simple problem.
More...
All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 07:16:34
.