?
Solved

JTabbedPane Layout

Posted on 2004-09-20
6
Medium Priority
?
259 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
Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

 
LVL 92

Accepted Solution

by:
objects earned 200 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 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