Solved

JTabbedPane: customizing

Posted on 2003-12-07
10
746 Views
Last Modified: 2007-12-19
Hi there,
I'm using a JTabbedPane for my GUI, and I'd like to customize its view a bit.
There are two things which I want to modify:

1) the gap at the bottom of the tabs (assuming my tabs are at the bottom of the screen). Under the tabs, there's a small gap (maybe a couple of pixels), and that's too much of a waste of space for my GUI, so I'd like to be able to set that gap to zero, so that my tabs appear like buttons at a SOUTH location

2) the border around the tabs. I'd like to make it non-visible. I mean, I'd like to have my icons one next to the other, without being able to see that each icon belongs to a tab. So that the user doesn't know which layout I'm using. The only thing the user should see are my icons.

Thanks a lot for your help.



Just a small clarification: I'll split the points between both questions, if the answers allow me to modify my GUI in the way I want to.
0
Comment
Question by:Flashdaddee
  • 3
  • 2
  • 2
10 Comments
 

Author Comment

by:Flashdaddee
ID: 9891946
BTW, I'm using JDK 1.3
0
 
LVL 15

Accepted Solution

by:
jimmack earned 50 total points
ID: 9891951
You may be better switching to something like a CardLayout for the main contents (currently in your tabbed pages) and having a separate component for the selection of cards.

Changing the standard appearance of the tabs may be more trouble than it's worth.
0
 

Author Comment

by:Flashdaddee
ID: 9892012
I tried with CardLayout, and although the look for the GUI was nice, the interaction wasn't as good (I had some problems with the JPanels in each card). That's why I was trying to get a JTabbedPane looking like a CardLayout.

If I don't find an easy way, I guess I'll try harder with the CardLayout.

Thanks jimmack
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 15

Expert Comment

by:jimmack
ID: 9892047
;-)
0
 
LVL 92

Assisted Solution

by:objects
objects earned 50 total points
ID: 9892984
Which L&F are you using? If you can't get it to look as you like, one option would be to write your own L&F.
0
 

Author Comment

by:Flashdaddee
ID: 9893529
>> Which L&F are you using?

Since it's for Pocket PCs, I'm trying to make it Windows-like.

Maybe in a couple of months I'll try to get my own L&F, trying to get the rotated JPanels as well (as in my other thread).
0
 
LVL 92

Expert Comment

by:objects
ID: 9893556
If you're interested we did a custom tab implementation for the applets used at http://www.evalu8.com.au
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 96
eclipse argument 14 60
servlet doXXX methods 3 48
Oracle SQL syntax check  without executing 6 50
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…
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…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

813 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

17 Experts available now in Live!

Get 1:1 Help Now