JTabbedPane Layout

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?
vibration2kAsked:
Who is Participating?
 
objectsConnect With a Mentor Commented:
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
 
nesnemisCommented:
what exactly do you mean?
0
 
vibration2kAuthor Commented:
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
Cloud Class® Course: Microsoft Azure 2017

Azure has a changed a lot since it was originally introduce by adding new services and features. Do you know everything you need to about Azure? This course will teach you about the Azure App Service, monitoring and application insights, DevOps, and Team Services.

 
JollinaCommented:
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
 
vibration2kAuthor Commented:
Can you suggest me some example code to actually implement whatever you suggested?
0
 
objectsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.