Thread View: borland.public.jbuilder.java.swing
2 messages
2 total messages
Started by Adrian Pitulac
Sat, 21 Feb 2004 02:16
how to use the free space available in the right of the JTabbedPanels?
Author: Adrian Pitulac
Date: Sat, 21 Feb 2004 02:16
Date: Sat, 21 Feb 2004 02:16
15 lines
1473 bytes
1473 bytes
Hello, I was wondering if i can use the free space on the screen available when i use a JTabbedPanel and i don't have so much tabs for all the horizontal size of the JTabbedPanel. I want to use it for some buttons and some logos.... Also how can i add the buttons to navigate over the tabs? I have seen such applications and those buttons were in that empty space i was talking about. Which is the best method to navigate between tabs? Thanks in advance..... Adrian
Re: how to use the free space available in the right of the JTabbedPanels?
Author: John McGrath [TeamB]
Date: Sat, 28 Feb 2004 22:45
Date: Sat, 28 Feb 2004 22:45
36 lines
2447 bytes
2447 bytes
On 2/20/2004 at 9:16:06 PM, Adrian Pitulac wrote:
> I was wondering if i can use the free space on the screen available
> when i use a JTabbedPanel and i don't have so much tabs for all the
> horizontal size of the JTabbedPanel. I want to use it for some
> buttons and some logos....
JTabbedPane does not provide that functionality, so there is no easy
way to get the effect you want. If you are *very* determined, it would
be possible, but I would not recommend it.
One way would be create a panel and place it above the JTabbedPane.
You could place this in the same container and have the layout manager
control the position. Or you could place the panel on the layered
pane. In either case, you would need to monitor the JTabbedPane for
changes in size or position and make the necessary adjustments.
The other approach would be to create a subclass of JTabbedPane that
would allow you to add components to that area. This would probably
involve messing with the UI delegate, which would not be simple.
> Also how can i add the buttons to navigate over the tabs? I have seen
> such applications and those buttons were in that empty space i was
> talking about. Which is the best method to navigate between tabs?
Have your buttons call the setSelectedIndex() or setSelectedComponent()
method on the JTabbedPane.
--
Regards,
John McGrath [TeamB]
---------------------------------------------------
Before sending me e-mail, please read:
http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads