Here's my code so far; It will load both applet and DataMartJFrameUI seperately.
public class MyApplet extends JApplet { private DataMartJFrameUI myFrame; public MyApplet() { init(); } public void init() { DataMartJFrameUI ddf = new DataMartJFrameUI(); ddf.setVisible(true); myFrame.setSize(500, 300); } }
[ April 22, 2007: Message edited by: jite eghagha ] [ April 22, 2007: Message edited by: jite eghagha ]
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35243
7
posted
0
Follow the link I posted, and read about the "ApplicationApplet" class. It does the opposite of MainFrame - allowing you to run an application as an applet.
jite eghagha
Ranch Hand
Joined: Oct 06, 2006
Posts: 124
posted
0
Without package Acme; that link isn't much help.
I read through the code but don't see anything that embeds a JFrame in the applet.
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35243
7
posted
0
Without package Acme; that link isn't much help.
The other classes of the Acme package that may be required can be downloaded from that site as well.
I read through the code but don't see anything that embeds a JFrame in the applet.
That class helps embed an application (doesn't matter whether it uses a JFrame or not) in an applet. That's what you were trying to do, no? It would be trivial to change the "Applet" (which it currently is) to a "JApplet".
If you don't have a full application -just the class extending JFrame- what's stopping you from opening that in an applet?