• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

calling JFrame in JApplet

 
Beena Thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Is it possible to call a JFrame inside a JApplet and how is it.
When i tried it is showing java.lang.IllegalArgumentException: adding a window to a container.

Can anyone help me with this
Thanks
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Beena,
Yes you can create a new JFrame from within a JApplet.

Will do it. However, your error seems to relate to you trying to place a Frame into an Applet. This is not allowed because an Applet is a container while a Frame is a window. If you just want a container inside an APplet then you should use a Panel.
Regards,
Manfred.
 
Beena Thomas
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manfred.
If that is the case is it possible to use an instance of JPanel having a JFileChooser added to its contentpane get displayed in a JApplet.
I would appreciate your response
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic