-
Bug
-
Resolution: Fixed
-
P2
-
5.0, 5.0u1, 6
-
b86
-
generic, x86
-
generic, linux_2.6, windows_xp
FULL PRODUCT VERSION :
1.5.0
ADDITIONAL OS VERSION INFORMATION :
Windows XP
EXTRA RELEVANT SYSTEM CONFIGURATION :
None
A DESCRIPTION OF THE PROBLEM :
The setTooltipText() nolonger works under 1.5, which works fine under 1.4. In order to show the tool tip text under 1.5, the panel where the component reside has to get focused.The following is a simple test program. If you comiple
and run this under 1.5 (Tiger), you'll see that tool tip text only shows up on the button where the jdialog gets focus. The tool tip text will not show on the button where the jdialog is not focused.
If you try the program using 1.4, both buttons will show the tool tip text regardless if the jdialog gets focus. This is certainly a bug in the basic GUI
component in 1.5 and should be fixed easily since it works under 1.4.
REPRODUCIBLE TESTCASE:
=====================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.*;
public class ToolTipTest extends JFrame
{
JDialog jdialog1, jdialog2;
public ToolTipTest()
{
jdialog1=new JDialog();
jdialog2=new JDialog();
jdialog1=new JDialog(this, false);
jdialog1.setLocation(0,0);
jdialog1.setSize(new Dimension(165, 240));
jdialog2=new JDialog(this, false);
jdialog2.setLocation(200,200);
jdialog2.setSize(new Dimension(165, 240));
JButton jbtn1=new JButton("Click Me");
JButton jbtn2=new JButton("Click Me");
jdialog1.getContentPane().add(jbtn1,BorderLayout.CENTER);
jdialog2.getContentPane().add(jbtn2,BorderLayout.CENTER);
jbtn1.setToolTipText("Button1");
jbtn2.setToolTipText("Button2");
this.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit (0);
}
}
);
this.pack();
setVisible(true);
jdialog1.setVisible(true);
jdialog2.setVisible(true);
}
public static void main(String argv[])
{
new ToolTipTest();
}
}
REPRODUCIBILITY :
This bug can be reproduced always.
Release Regression From : 1.4.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 10/12/04 21:16 GMT
1.5.0
ADDITIONAL OS VERSION INFORMATION :
Windows XP
EXTRA RELEVANT SYSTEM CONFIGURATION :
None
A DESCRIPTION OF THE PROBLEM :
The setTooltipText() nolonger works under 1.5, which works fine under 1.4. In order to show the tool tip text under 1.5, the panel where the component reside has to get focused.The following is a simple test program. If you comiple
and run this under 1.5 (Tiger), you'll see that tool tip text only shows up on the button where the jdialog gets focus. The tool tip text will not show on the button where the jdialog is not focused.
If you try the program using 1.4, both buttons will show the tool tip text regardless if the jdialog gets focus. This is certainly a bug in the basic GUI
component in 1.5 and should be fixed easily since it works under 1.4.
REPRODUCIBLE TESTCASE:
=====================================================
import java.awt.*;
import java.awt.event.*;
import javax.swing.event.*;
import javax.swing.*;
public class ToolTipTest extends JFrame
{
JDialog jdialog1, jdialog2;
public ToolTipTest()
{
jdialog1=new JDialog();
jdialog2=new JDialog();
jdialog1=new JDialog(this, false);
jdialog1.setLocation(0,0);
jdialog1.setSize(new Dimension(165, 240));
jdialog2=new JDialog(this, false);
jdialog2.setLocation(200,200);
jdialog2.setSize(new Dimension(165, 240));
JButton jbtn1=new JButton("Click Me");
JButton jbtn2=new JButton("Click Me");
jdialog1.getContentPane().add(jbtn1,BorderLayout.CENTER);
jdialog2.getContentPane().add(jbtn2,BorderLayout.CENTER);
jbtn1.setToolTipText("Button1");
jbtn2.setToolTipText("Button2");
this.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit (0);
}
}
);
this.pack();
setVisible(true);
jdialog1.setVisible(true);
jdialog2.setVisible(true);
}
public static void main(String argv[])
{
new ToolTipTest();
}
}
REPRODUCIBILITY :
This bug can be reproduced always.
Release Regression From : 1.4.2
The above release value was the last known release where this
bug was known to work. Since then there has been a regression.
###@###.### 10/12/04 21:16 GMT
- duplicates
-
JDK-6269062 Tooltip text does not appear if enclosed within JWindow without a JFrame
- Closed
-
JDK-6405841 Showing a new window changes the Z-order for the focused window
- Closed
-
JDK-6298752 Tooltips don't appear when any other window is fronted
- Closed
-
JDK-6529793 Swing's default behavior should be to display tooltips when window lacks focus.
- Closed
-
JDK-6401412 Tooltips do not show for unfocused frames
- Closed
- relates to
-
JDK-4148057 Using ToolTips causes inactive app window to exhibit active window behavior
- Resolved
(1 relates to)