-
Bug
-
Resolution: Duplicate
-
P5
-
None
-
1.3.0
-
None
-
generic
-
generic
pressing ctrl-shift right arrow selects the next word in
a JTextField. it doesn't, however, select the rightmost
word in the field.
the following code creates a JTextField. clicking in the word
'one' & then pressing ctrl-shift rightarrow repeatedly selects
the words 'one' 'two' 'three' & 'four' but never 'five'
import javax.swing.*;
import java.awt.event.*;
public class test{
public static void main(String args[]){
JFrame frame = new JFrame();
JTextField text = new JTextField(40);
text.setText("one two three four five");
frame.getContentPane().add(text);
frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}});
frame.pack();
frame.setVisible(true);
}
}
the same holds for ctrl rightarrow (no shift) which moves the
cursor one word to the right but won't work for the rightmost
word.
a JTextField. it doesn't, however, select the rightmost
word in the field.
the following code creates a JTextField. clicking in the word
'one' & then pressing ctrl-shift rightarrow repeatedly selects
the words 'one' 'two' 'three' & 'four' but never 'five'
import javax.swing.*;
import java.awt.event.*;
public class test{
public static void main(String args[]){
JFrame frame = new JFrame();
JTextField text = new JTextField(40);
text.setText("one two three four five");
frame.getContentPane().add(text);
frame.addWindowListener(new WindowAdapter(){
public void windowClosing(WindowEvent e){
System.exit(0);
}});
frame.pack();
frame.setVisible(true);
}
}
the same holds for ctrl rightarrow (no shift) which moves the
cursor one word to the right but won't work for the rightmost
word.
- duplicates
-
JDK-4282237 JTextField keybindings: Shift+Ctrl+arrow keys works inaccurately
-
- Closed
-