ctrl-shift rightarrow doesn't select rightmost word in JTextField

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P5
    • None
    • Affects Version/s: 1.3.0
    • Component/s: client-libs
    • None

      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.

            Assignee:
            Scott Violet (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: