Solved

JTabbedPane Layout

Posted on 2004-09-20
6
250 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
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 Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
powerN  challenge 3 47
mapBully challenge 6 89
topping1 challenge 7 51
maven example error 3 36
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

757 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now