-
Bug
-
Resolution: Duplicate
-
P2
-
None
-
1.4.0
-
x86
-
generic
This happens only in Windows. Click the JButton component that appears on running the following app so that it gets the focus. Keep the mouse over the button so that tooltip associated with that button appears. Once the tooltip appears, the focus on the button gets removed.
D:\>java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b58)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b58, mixed mode)
Happens in: Windows, but not in Solaris Sparc.
Code used:
import java.awt.*;
import javax.swing.*;
public class testHeavyPop {
Frame heavy_pop;
JPanel panel;
JButton btn1;
public testHeavyPop() {
heavy_pop = new Frame("Heavy-weight Popup Test");
heavy_pop.setSize(300,150);
panel = new JPanel();
panel.setLayout(new GridLayout(1,1));
heavy_pop.add(panel);
btn1 = new JButton("Button 1");
btn1.setToolTipText("I am tooltip over button 1!");
panel.add(btn1);
heavy_pop.show();
}
public static void main(String args[]) {
testHeavyPop t = new testHeavyPop();
}
}
D:\>java -version
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b58)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b58, mixed mode)
Happens in: Windows, but not in Solaris Sparc.
Code used:
import java.awt.*;
import javax.swing.*;
public class testHeavyPop {
Frame heavy_pop;
JPanel panel;
JButton btn1;
public testHeavyPop() {
heavy_pop = new Frame("Heavy-weight Popup Test");
heavy_pop.setSize(300,150);
panel = new JPanel();
panel.setLayout(new GridLayout(1,1));
heavy_pop.add(panel);
btn1 = new JButton("Button 1");
btn1.setToolTipText("I am tooltip over button 1!");
panel.add(btn1);
heavy_pop.show();
}
public static void main(String args[]) {
testHeavyPop t = new testHeavyPop();
}
}
- duplicates
-
JDK-4432422 ToolTips over a heavy-weight window causes the app to lose focus.
- Closed