hi, Can you tell me how to call an applet from an applet .ie. if press a button on an applet it should open another applet. Thanks in advance KK
Sanjaya KasthuriArachchi
Greenhorn
Joined: Feb 06, 2001
Posts: 5
posted
0
try this .......... public void actionPerformed(ActionEvent A){ AppletContext appcon=getAppletContext(); appcon.showDocument("url of the page which contains the second applet","name of the frame"); }
Rohit Sharma
Greenhorn
Joined: Dec 28, 2000
Posts: 4
posted
0
well! showDocument() works in browsers only. is there any method to open a new applet in appletviewer by pressing a button on one applet? rohit
chinmay naidu
Greenhorn
Joined: Dec 02, 2000
Posts: 5
posted
0
Can any body help on this ?I am also in the same prob... Regards,
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
posted
0
An appletViewer is meant to be a "not fully functional browser". Just for testing basic applets. So the answer is - NO. You will have to test in a browser.
"JavaRanch, where the deer and the Certified play" - David O'Meara
sujata mehta
Greenhorn
Joined: Feb 21, 2001
Posts: 4
posted
0
Hi! is it possible that instead of pressing button i press some text in that applet & another applet gets opened?
Cindy Glass
"The Hood"
Sheriff
Joined: Sep 29, 2000
Posts: 8521
posted
0
Yes, that would be a link. It would open a different HTML page with an applet on it.
sujata mehta
Greenhorn
Joined: Feb 21, 2001
Posts: 4
posted
0
But how to give a link in applet if we r using drawString method to display the text which when pressed should open another page? or some other method should b used to draw the text? pls reply soooon. Thanks
parag Joshi
Greenhorn
Joined: Feb 26, 2001
Posts: 2
posted
0
try Using Mouse Listener to check out the Point that is clicked inside the text area. Then you will be able to get a click on the Text. then the same procedure can be adopted.