tags:

views:

21

answers:

1

Hi

I have created all my project files as swing applications, i.e files extending JApplet, how to call one JApplet file from another? i kow set visible methods are there for jFrame but now i dont have time to convert everything to convert, please help as soon as possible

+1  A: 

Basically, you can't. Or, rather, it's difficult. Running an applet requires the construction of an AppletContext and management of the applet life cycle.

A better approach would be to move all of the code you have in your applet to a JPanel. Then have a simple applet that just creates the panel.

Then, when you want to open another panel, you create a JFrame and populate it with the appropriate panel.

Devon_C_Miller
is there any easy way to convert JApplet to JFrame?
karthi
thanks.. i just copied the contents of JApplet from design view to JFrame and it worked :)
karthi