Solved

JTabbedPane Layout

Posted on 2004-09-20
6
258 Views
Last Modified: 2006-11-17
My JFrame has a BorderLayout.
I am placing a JTabbedPane at the North.
I want that when the user selects a Tab (from JTabbedPane) , the components of JTabbedPane should be displayed in the  BorderLayout.LEFT.
How can this be done?
0
Comment
Question by:vibration2k
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 3

Expert Comment

by:nesnemis
ID: 12104519
what exactly do you mean?
0
 

Author Comment

by:vibration2k
ID: 12113277
I mean that I want to place the components of a tabbed pane at a particular position in my frame. The components of the JTabbedPane (Components of a Tab of the JTabbedPane) should not be placed by default.
0
 

Expert Comment

by:Jollina
ID: 12117540
use one or more panels and place things using gridbag layout.
Or you could use a GUI Designer with your ide, I prefer this one http://www.jetbrains.com/idea/index.html
0
What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

 
LVL 92

Accepted Solution

by:
objects earned 50 total points
ID: 12117736
Can't be done directly.

You could try using empty panels in your tabbed pane, and add a ChangeListener to switch the panel displayed in the LEFT (using a CardLayout)
0
 

Author Comment

by:vibration2k
ID: 12124388
Can you suggest me some example code to actually implement whatever you suggested?
0
 
LVL 92

Expert Comment

by:objects
ID: 12128853
Have a look at the following:

http://java.sun.com/products/jfc/tsc/articles/cardpanel/index.html

And have your ChangeListener do the panel switching accoring to which tab is selected.
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question