-
Bug
-
Resolution: Not an Issue
-
P2
-
None
-
1.4.0
-
sparc
-
generic
The JButton inside a popup is not getting the focus after first mouse click. This happens in Solaris Sparc machines and is not happening in Windows platforms.
Step to reproduce: Click the button that pops out on running the following program.
Hardware & OS in which testing done: Ultra 10 & OS ver 5.7
Code to reproduce:
import java.awt.*;
import javax.swing.*;
public class poptest01 {
JLabel label;
JButton button;
public poptest01() {
button = new JButton("Hello, World!");
button.setBackground(Color.green);
button.setToolTipText("it is a button!");
PopupFactory factory = PopupFactory.getSharedInstance();
Popup popup = factory.getPopup(null, button, 100, 200);
popup.show();
/*try {
Thread.sleep(2000);
}
catch (InterruptedException ie) {
ie.printStackTrace();
}*/
//popup.hide();
}
public static void main(String args[]) {
poptest01 s = new poptest01();
}
}
More info:
The button is not getting the dotted rectangle around the button name, which indicates that the button indeed has the focus.
sridhar.raman@eng 2001-08-06
Step to reproduce: Click the button that pops out on running the following program.
Hardware & OS in which testing done: Ultra 10 & OS ver 5.7
Code to reproduce:
import java.awt.*;
import javax.swing.*;
public class poptest01 {
JLabel label;
JButton button;
public poptest01() {
button = new JButton("Hello, World!");
button.setBackground(Color.green);
button.setToolTipText("it is a button!");
PopupFactory factory = PopupFactory.getSharedInstance();
Popup popup = factory.getPopup(null, button, 100, 200);
popup.show();
/*try {
Thread.sleep(2000);
}
catch (InterruptedException ie) {
ie.printStackTrace();
}*/
//popup.hide();
}
public static void main(String args[]) {
poptest01 s = new poptest01();
}
}
More info:
The button is not getting the dotted rectangle around the button name, which indicates that the button indeed has the focus.
sridhar.raman@eng 2001-08-06
- relates to
-
JDK-4396407 Can't set focus to the component
- Resolved