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

JOptionPane showConfirmDialog returns incorrect value

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Not an Issue
    • Affects Version/s: 6
    • Fix Version/s: 6
    • Component/s: client-libs
    • Labels:
      None

      Description

      Run the below test case. It pops a JOptionPane confirm dialog. Using Tab key select
      2nd or 3rd button, returned value from showConfirmDialog is always 0.

      //begin test case

      import javax.swing.*;

      public class OptionPaneBug
      {
      public static void main (String [] args)
      {
        int i =
             JOptionPane.showConfirmDialog (null,
              "Press Tab to select different option, then press Enter key. ");

        System.out.println ("Selected value : " + i);
      }
      }
      // end test case

        Attachments

          Activity

            People

            • Assignee:
              shickeysunw Shannon Hickey (Inactive)
              Reporter:
              rlingaiaorcl Ranjit Lingaiah (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: