adding tabbed pane to a split pane

How do you add a tabbed pane to a split pane... here is my tidbit of code

JTabbedPane tabs=new JTabbedPane();

tabs.addTab("tab1", text);

tabs.addTab("tab2",tab2.getPanel1());

tabs.addTab("tab3",tab3.getReconPanel());

queryPane =new JSplitPane();

queryPane.setOrientation(javax.swing.JSplitPane.VERTICAL_SPLIT);

censorPanel.add(queryPane, c);

c.gridx = 0;

c.gridy = 1;

c.ipady = 0;

c.weighty = 0.05;

c.weightx = 0.05;

c.gridwidth = 1;

JPanel.add(update, c);

[689 byte] By [h2opologirly69a] at [2007-11-27 10:50:35]
# 1

How do you add any component to a split pane? A tabbed pane is no different than any other component.

"How to Use Split Panes"

http://java.sun.com/docs/books/tutorial/uiswing/components/splitpane.html

camickra at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 2

okay thanks... quick questions what type of listener would you use when you hit one tab , and when you pick that one tab it sets some buttons to false? mouselistener or?

h2opologirly69a at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 3

ChangeListener

camickra at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 4

The listener you use depends on what you may want to achieve.

You can either use a Mouselistener or ChangeListener depending on your needs. You could even attach a MouseWheelListener, or implement your own listener, subclass JTabbedPane to include some extra code and attach the listener. Your options are many. Pick and test if you have the time

ICE

icewalker2ga at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 5

I have three panes when I get to the third pane i want to make some buttons that are one the side of the jframe disappear. then when i go to the 2 or 1st pane make them visible again.

h2opologirly69a at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 6

> I have three panes when I get to the third pane i want to make some buttons that are one the side of the jframe disappear. then when i go to the 2 or 1st pane make them visible again.

I also have a Dog that I want to give a bath so I can keep in the house. But when I return from home I want him outside, which means he'll be dirty again.

Have you even bothered to try the suggestions given you before posting another question? The solution given above are the starting point to the solution of this problem. All that is left after that is some if ... else code.

ICE

icewalker2ga at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 7

I was just responding to the question that they asked what specifically i was doing and yes i actually finished it THANK YOU!

h2opologirly69a at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...
# 8

Your sarcasm was not necessary.

h2opologirly69a at 2007-7-29 11:26:07 > top of Java-index,Desktop,Core GUI APIs...