Hi, I'm trying to use tabbedpanes, my objective is to have a frame split in half( in height).
You have the upper tabbed pane, and the lower tabbed pane. Both of them have the same three panels, so the user can choose wether to see panel1 in up and pane2 in down, or panel3 up and panel 1 down,etc.
Basicly, I tried to this doing this:

JTabbedPane panelUp = new JTabbedPane();
	JTabbedPane panelDown = new JTabbedPane();

		panelUp .addTab("Mao", icon, panel1, "Does nothing");
		panelUp .addTab("Meu", icon, panel2, "Does nothing");
		panelUp .addTab("Teu", icon, panel3, "Does nothing");

		panelDown .addTab("Mao2", icon, panel1, "Does nothing");
		panelDown .addTab("Meu2", icon, panel2, "Does nothing");
		panelDown .addTab("Teu2", icon, panel3, "Does nothing");

But if I do that, only the lower tabbedpane appears, and the upper one doesn't.

Can anyone help me?Give me a explanation?

PS: I'm using a gridlayout to split the frame

Edited by duuude: Extra info

6 Years
Discussion Span
Last Post by Anuradha Mandal

Why do you want to use the SAME panel? To display the same stuff or what?
Use unique components for each container and have the components share what they use.


that not possible, that reall Swing bug if two Tabs contains same JComponents schema

Edited by mKorbel: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.