Meaningless Drivel is fun!*
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


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Problem with JTabbedPane" Watch "Problem with JTabbedPane" New topic
Author

Problem with JTabbedPane

Pat Hays
Ranch Hand

Joined: Aug 20, 2004
Posts: 138
Hi,

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:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4668865

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

http://www.infonode.net/index.html?itp
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