Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4640009

JOptionPane does not support keyboard navigation

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P5 P5
    • None
    • 1.4.0
    • client-libs


      ###@###.### 2002-02-19

      In native Windows, when interacting with a MessageBox(...), one can use the
      arrow keys to navigate between buttons (e.g. <- is the same as Shift-Tab and
      -> the same as Tab). This is apparently not currently supported by
      JOptionPane. Arguably, JOptionPane should mimic MessageBox.

      Test program:
      ---------------
      import javax.swing.*;
      public class JOPArrows
      {
      public static void main(String[] args)
      {
      try {
      UIManager.setLookAndFeel(
      "com.sun.java.swing.plaf." +"windows.WindowsLookAndFeel");
      JOptionPane.showConfirmDialog(null,
      "Left and right arrows should "
      +"change button focus.");
      }
      catch (Exception e) {
      e.printStackTrace();
      }
      }
      }

            shickeysunw Shannon Hickey (Inactive)
            tyao Ting-Yun Ingrid Yao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: