jQuery in Action, 2nd edition*
The moose likes Swing / AWT / SWT and the fly likes jpanel and internal frame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jpanel and internal frame" Watch "jpanel and internal frame" New topic
Author

jpanel and internal frame

alun groome
Greenhorn

Joined: Jan 21, 2005
Posts: 21
Hi,

Im alittle new to GUI programming. Is it possible to add a pnel to an internal frame>?

I have created a panel in a class of its own called myPanel. If it is possible to add the panel to the internal frame, how would I do this??

thanks in advance

public class GUI extends JFrame {
public Integer LAYOUT_FRAME_LAYER = new Integer(1);

public GUI() {
super("Music Theory application");
setSize(500, 460);
JDesktopPane desktop = new JDesktopPane();
getContentPane().add(desktop);

JInternalFrame fr1 =
new JInternalFrame("Java Piano",true,true);
fr1.setBounds(10,10,150,150);
Container c = fr1.getContentPane();
c.setLayout(new FlowLayout());


//add panel here??


desktop.add(fr1,0);
fr1.show();


}
sasi kala
Ranch Hand

Joined: Dec 17, 2004
Posts: 68
Hi,

Adding panel to internal frame is possible. its just like adding panel to frame.



All The Best
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jpanel and internal frame