-
Bug
-
Resolution: Cannot Reproduce
-
P2
-
None
-
1.0.2, 1.1
-
None
-
sparc
-
solaris_2.5, solaris_2.5.1
JDK 1.1/Solaris Motif
The following program demonstrates a JDK1.1/Solaris Motif problem with Choice boxes and tab naviagation. When attempting to tab from the TextField into the Choice box, the Choice does not take focus, although FocusManager.assignFocus() and peer.requestFocus() are called.
import java.awt.*;
import java.applet.*;
public class Test extends Applet {
public void init() {
add(new TextField("ABC", 30));
Choice c = new Choice();
c.addItem("choice 1");
c.addItem("choice 2");
c.addItem("choice 3");
add(c);
add(new TextField("DEF", 30));
add(new Button("OK"));
}
}
Output with added print statements:
-----------------------------------
% java sun.applet.AppletViewer Test.html
FocusManager.focusNext: base=java.awt.TextField[textfield0,125,5,260x29,text=ABC,editable,selection=3-3]
FocusManager.assignFocus: java.awt.Choice[choice0,390,6,82x27,current=choice 1]
peer.requestFocus()
FocusManager.focusNext: base=java.awt.TextField[textfield1,477,5,260x29,text=DEF,editable,selection=3-3]
FocusManager.assignFocus: java.awt.Button[button0,742,8,32x22,label=OK]
peer.requestFocus()
The following program demonstrates a JDK1.1/Solaris Motif problem with Choice boxes and tab naviagation. When attempting to tab from the TextField into the Choice box, the Choice does not take focus, although FocusManager.assignFocus() and peer.requestFocus() are called.
import java.awt.*;
import java.applet.*;
public class Test extends Applet {
public void init() {
add(new TextField("ABC", 30));
Choice c = new Choice();
c.addItem("choice 1");
c.addItem("choice 2");
c.addItem("choice 3");
add(c);
add(new TextField("DEF", 30));
add(new Button("OK"));
}
}
Output with added print statements:
-----------------------------------
% java sun.applet.AppletViewer Test.html
FocusManager.focusNext: base=java.awt.TextField[textfield0,125,5,260x29,text=ABC,editable,selection=3-3]
FocusManager.assignFocus: java.awt.Choice[choice0,390,6,82x27,current=choice 1]
peer.requestFocus()
FocusManager.focusNext: base=java.awt.TextField[textfield1,477,5,260x29,text=DEF,editable,selection=3-3]
FocusManager.assignFocus: java.awt.Button[button0,742,8,32x22,label=OK]
peer.requestFocus()
- duplicates
-
JDK-1259704 Choice items are not tabbable
-
- Closed
-
-
JDK-4029221 cannot tab to a choice
-
- Closed
-
- relates to
-
JDK-4053856 Choice components don't honour key focus
-
- Closed
-