Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

I did it!!!! JApplet within JInternalFrame  RSS feed

 
TransZamboni
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I havn't tested it on our real applets yet but I think it will work.
Here's what you do: Add the JApplet's contentPane to the JInternalFrame instead of the applet itself.
The getContentPane() returns a container object. JComponent extends Container. Therefore the contentPane is lightweight!




I tested my theory with a very simple class extending JApplet. The applet has one button on it that System-outs some simple text. It worked! It cleared up the flickering also.
 
TransZamboni
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Update: You may also use the JRootpane to do the same thing. This will give you a few things where the content pane would not. GlassPane, ContentPane (Container object) and JMenuBar are contained within the JRootpane.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!