• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Putting a JTabbedPane in a JInternalFrame

 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
Just wanted to say that I have solved the problem
Regards
S�ren Augustesen
reply
    Bookmark Topic Watch Topic
  • New Topic