This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "jpanel and internal frame" Watch "jpanel and internal frame" New topic

jpanel and internal frame

alun groome

Joined: Jan 21, 2005
Posts: 21

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();

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

//add panel here??


sasi kala
Ranch Hand

Joined: Dec 17, 2004
Posts: 68

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

All The Best
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: jpanel and internal frame
It's not a secret anymore!