-
Bug
-
Resolution: Fixed
-
P4
-
1.1.2, 1.2.2
-
hopper
-
sparc
-
solaris_2.5.1, solaris_8
-
Verified
Name: tb29552 Date: 06/24/97
1. - Start the sample programm.
- Click on the second button.
- Click on the last button.
- Now the TextField will have the focus.
I tried to implement a context sensitive status bar, but it does
not work, because every time a new status bar should be displayed,
the main window is resized and the focus is changed to the first
component.
2. Example source:
import java.awt.*;
import java.awt.event.*;
public class FocusBug extends Frame implements ActionListener {
public FocusBug() {
setLayout(new GridLayout(3, 1));
add(new TextField("Has focus after resize"));
add(new Button("Give me the focus please!"));
add(new Button("Test it!"));
((Button)getComponent(2)).addActionListener(this);
pack();
}
public void actionPerformed(ActionEvent e) {
setSize(200, 200);
doLayout();
pack();
}
public static void main(String[] args) {
FocusBug window = new FocusBug();
window.show();
}
}
company - TS Softwareentwicklung , email - ###@###.###
======================================================================
- relates to
-
JDK-4223369 Cricket/Chelsea Regression: Reloading CardTest applet crashes on Solaris
- Closed
-
JDK-4102108 sol: Focus Traversal broken; Components lose focus after resize
- Closed
-
JDK-4397818 Focus randomly not available in components - JCK tests failures result
- Closed