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

File Dialog gets disposed when clicking 'ok'/'save' button without selecting anything, XToolkit

XMLWordPrintable

    • sparc
    • solaris_10

      An AWT FileDialog gets disposed when the user clicks on 'OK' / 'Save' button without selecting any file. This behavior is seen only on XToolkit and it does not match with typical file dialogs in any real-time UI. For ex, this does not happen on Win32 and it does not happen on JFileChooser. A file dialog should be disposed only when the user selects some file or when he explicitly presses 'ESC' or clicks on the cancel button. This is how win32 dialogs and swing JFileChooser behaves and this is the basic expectation set by file dialogs used in any real-time applications.

      This is reproducible with XToolkit as well as Motif atleast since 1.5 on unix platforms. Would be good to fix this on XToolkit to make FileDialogs on XToolkit compatible with other platforms and other native dialogs.

      I have attached a sample test which reproduces this bug. Just click on the ok button without selecting anything and you will see the file dialog being disposed.

            dcherepanov Dmitry Cherepanov
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: