This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 91643 - ViewTooltips broken on JDK 7
Summary: ViewTooltips broken on JDK 7
Status: CLOSED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: t_h
URL:
Keywords: JDK_SPECIFIC
Depends on:
Blocks:
 
Reported: 2006-12-29 23:21 UTC by Jesse Glick
Modified: 2011-06-09 09:56 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Correct screenshot, on JDK 6 (15.20 KB, image/png)
2006-12-29 23:27 UTC, Jesse Glick
Details
Incorrect screenshot, on JDK 7 (13.49 KB, image/png)
2006-12-29 23:28 UTC, Jesse Glick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2006-12-29 23:21:10 UTC
Run against dev platform JARs and hover the mouse over the long label:

---%<---
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import org.openide.explorer.ExplorerManager;
import org.openide.explorer.view.BeanTreeView;
import org.openide.nodes.AbstractNode;
import org.openide.nodes.Children;
import org.openide.nodes.Node;
public class LongToolTips extends JFrame implements ExplorerManager.Provider {
    ExplorerManager mgr = new ExplorerManager();
    LongToolTips() {
        super("LongToolTips");
        Children.Array ch = new Children.Array();
        Node parent = new AbstractNode(ch);
        parent.setDisplayName("parent");
        Node n1 = new AbstractNode(Children.LEAF);
        n1.setDisplayName("short name");
        Node n2 = new AbstractNode(Children.LEAF);
        StringBuilder b = new StringBuilder("long name: ");
        for (int i = 1; i <= 100; i++) {
            b.append(" some part of the message #" + i + " ");
        }
        n2.setDisplayName(b.toString());
        ch.add(new Node[] {n1, n2});
        mgr.setRootContext(parent);
        add(new BeanTreeView());
        pack();
        setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
        setVisible(true);
    }
    public ExplorerManager getExplorerManager() {
        return mgr;
    }
    public static void main(String[] args) {
        EventQueue.invokeLater(new Runnable() {
            public void run() {
                new LongToolTips();
            }
        });
    }
}
---%<---

On JDK 5/6, it displays fine. On JDK 7 (b04), the tool tip flickers gray rapidly
and then sticks: a grey window of one text line height appears across the entire
width of the screen and cannot easily be gotten rid of.

This is a significant problem when using the IDE on JDK 7. If you are
unfortunate enough to hover over a unit test failure message (in the Results
window) which is longer than the screen, you will be stuck with a grey bar on
top of your IDE, blocking text etc., until you restart.
Comment 1 Jesse Glick 2006-12-29 23:27:44 UTC
Created attachment 36957 [details]
Correct screenshot, on JDK 6
Comment 2 Jesse Glick 2006-12-29 23:28:06 UTC
Created attachment 36958 [details]
Incorrect screenshot, on JDK 7
Comment 3 _ tboudreau 2006-12-30 06:55:27 UTC
I'd suspect a JDK bug - on all platforms but Apple we're just using
javax.swing.PopupFactory - sounds like that's misbehaving in JDK 7.
Comment 4 _ tboudreau 2007-02-15 20:00:33 UTC
Is there a JDK bug for this yet?
Comment 5 Antonin Nebuzelsky 2008-02-07 16:10:53 UTC
Reassigning to new module owner Tomas Holy.
Comment 6 Lukas Hasik 2008-04-10 21:15:29 UTC
moving opened issues from TM <= 6.1 to TM=Dev
Comment 7 Jiri Rechtacek 2008-09-26 11:49:33 UTC
Works for me on
  Product Version         = NetBeans IDE Dev (Build 080924)
  Operating System        = Linux version 2.6.24-21-generic running on i386
  Java; VM; Vendor        = 1.7.0-ea; Java HotSpot(TM) Client VM 13.0-b01; Sun Microsystems Inc.
Comment 8 Marian Mirilovic 2011-06-09 09:56:04 UTC
v/c