Meaningless Drivel is fun!*
The moose likes Swing / AWT / SWT and the fly likes Putting a JTabbedPane in a JInternalFrame Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Putting a JTabbedPane in a JInternalFrame" Watch "Putting a JTabbedPane in a JInternalFrame" New topic
Author

Putting a JTabbedPane in a JInternalFrame

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi
Im fairly new to java programming and I'm trying to do the following:
I have a large frame (JFrame) in which I have two JInternalFrames. In one of these JInternalFrame I want to put a JTabbedPane.
So far I can make the JFrame and the two JInternalFrames without problems, but I can't get the JTabbedPane to appear inside the JInteranlFrame (I can make the JTabbedPane in a seperate file).
My question is therefore:
How do I get the JTabbedPane inside the JInternalFrame??
Do I have to declear the JInternalFrame as a JTabbedPane or something??
Any help on this is much appreciated.
Regards
S�ren Augustesen
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
HI,
I don't know what you are doing, but compare it to the lines below and make sure your code looks like it.
JComponent c = (JComponent) frame.getContentPane();
c.setLayout(new BorderLayout());
c.add(new JButton(), BorderLayout.NORTH);
c.add(new JButton(), BorderLayout.CENTER);
The above code adds two buttons to a frame (JInternalFrame or JFrame).
Regards,
Manfred.
Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi
Just wanted to say that I have solved the problem
Regards
S�ren Augustesen
 
Consider Paul's rocket mass heater.
 
subject: Putting a JTabbedPane in a JInternalFrame
 
Similar Threads
Multi-console interface
How to set focus on one of the two JInternalFrame
Remove menu item when internal frame is closed
Has anyone used JavaHelp?
A TOUGH question on JInternal Frame