This week's book giveaway is in the Jython/Python forum.
We're giving away four copies of Murach's Python Programming and have Michael Urban and Joel Murach on-line!
See this thread for details.
Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JTabbedPane  RSS feed

 
Philip Pross
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello to all, I have a question towards JTabbedPane.
I working on appication that has one but how would I insert another JTabbedPane in another.
Heres is my app
import java.awt.event.*;
import javax.swing.*;
import javax.swing.event.*;

public class Test2 extends JFrame
{
JTabbedPane tabbedPane = new JTabbedPane();
JPanel pPanel = new JPanel();
public static void main (String args[])
{
Test2 a = new Test2();
}
Test2()
{
createPanel();
setTitle("Test with JTabbedPane");
setSize(800, 600);
tabbedPane.addTab("Panel 1", pPanel);
getContentPane().add(tabbedPane, "Center");
setVisible(true);
}
public void createPanel()
{
pPanel.setLayout(null);
}
public void windowClosing(WindowEvent windowevent)
{
setVisible(false);
}
public void windowClosed(WindowEvent windowevent)
{
}
public void windowOpened(WindowEvent windowevent)
{
}
public void windowIconified(WindowEvent windowevent)
{
}
public void windowDeiconified(WindowEvent windowevent)
{
}
public void windowActivated(WindowEvent windowevent)
{
}
public void windowDeactivated(WindowEvent windowevent)
{
}
}
 
Manfred Leonhardt
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Philip,
Just do it! Example below shows easy it is.

Enjoy,
Manfred.
 
Philip Pross
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a million Manfred
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!