Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

adding applets to JFrame

Status
Not open for further replies.

Addola

Programmer
May 9, 2001
23
SA
hey all,

I have been working on a JFrame application and i want to add an applet to the JFrame so that I can added more than one applet working together...

I did like

Applet app = new Applet();

JFrame myFrame = new JFrame();

myFrame.getContentPane().add(app); // no proplems yet

app.init(); // oops !! NullPointerException !!!

app.start(); // No problems if I skipped the previous line !!!

Note the init() method is there in the Applet File !!


please help if you can ....
thanks you in advance






 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top