JDK-6269062 : Tooltip text does not appear if enclosed within JWindow without a JFrame
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 5.0u1
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux_2.6
  • CPU: x86
  • Submitted: 2005-05-11
  • Updated: 2011-01-19
  • Resolved: 2005-08-03
Related Reports
Duplicate :  
Description
The code includes a JToolBar wrapped inside a JPanel.
If the JPanel is in a JFrame, the tool tip text appears.
If it is in a JWindow, the tool tip text does not.
###@###.### 2005-05-11 22:41:07 GMT

Comments
WORK AROUND Making JWindow with visible JFrame or use udecorated JFrame which looks like JWindow, shows tooltips and allows focused components inside ###@###.### 2005-06-09 18:27:36 GMT
09-06-2005

EVALUATION Swing doesn't show tooltips for unfocused windows, to focus JWindow you need to create it with visible JFrame for example like JFrame frame = new JFrame(); JWindow window = new JWindow(frame); frame.setVisible(true); window.setVisible(true); in this case you'll get focused JWindow which is able to show tooltips and have focused components inside see also javadoc for JWindow(Window owner) it says: * Creates a window with the specified owner window. This window * will not be focusable unless its owner is showing on the screen. * If <code>owner</code> is <code>null</code>, the shared owner * will be used and this window will not be focusable. Moreover if you need a frame which looks like JWindow and support tooltips it can be done this way: JFrame f = new JFrame(); f.setUndecorated(true); JButton button = new JButton("Test"); button.setToolTipText("Hello"); f.add(button); f.pack(); f.setVisible(true); ###@###.### 2005-06-09 17:52:42 GMT
11-05-2005