Solved

JTabbedPane: customizing

Posted on 2003-12-07
10
744 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
Comment Utility
BTW, I'm using JDK 1.3
0
 
LVL 15

Accepted Solution

by:
jimmack earned 50 total points
Comment Utility
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
Comment Utility
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
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 15

Expert Comment

by:jimmack
Comment Utility
;-)
0
 
LVL 92

Assisted Solution

by:objects
objects earned 50 total points
Comment Utility
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
Comment Utility
>> 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
Comment Utility
If you're interested we did a custom tab implementation for the applets used at http://www.evalu8.com.au
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

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 functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
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…
This video teaches viewers about errors in exception handling.

743 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

14 Experts available now in Live!

Get 1:1 Help Now