wood burning stoves
The moose likes Swing / AWT / SWT and the fly likes Problem with JTabbedPane Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with JTabbedPane" Watch "Problem with JTabbedPane" New topic

Problem with JTabbedPane

Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138

I got a trouble with setting ToolTipText at the tabs of JTabbedPane.

Normally I can use the following code to set ToolTipText for the tabs. And it works.

But if I use a JTabbedPane which uses SCROLL_TAB_LAYOUT Policy shown as the following code, then the ToolTipText won�t work. The ToolTipText never appear.

Thanks to everyone's help.
[ October 01, 2004: Message edited by: Pat Hays ]

Download Java GUI Builder, <a href="http://www.mars3000.com" target="_blank" rel="nofollow">http://www.mars3000.com</a>
Alan Moore
Ranch Hand

Joined: May 06, 2004
Posts: 262
This is a bug, caused by the way they implemented scrolled tabs:


You can either upgrade to jdk 5.0 or use a real tabbed panel:

Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138
Thanks Alan for your help, You have saved my time.
I agree. Here's the link: http://aspose.com/file-tools
subject: Problem with JTabbedPane
It's not a secret anymore!