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

FileDialog focus is incorrect (Linux)

XMLWordPrintable

    • b21
    • x86, sparc
    • linux, solaris_2.5.1
    • Not verified

      OPERATING SYSTEM(S)
      -------------------
      Linux AMD64

      FULL JDK VERSION(S)
      -------------------
      java version "1.6.0_02"
      Java(TM) SE Runtime Environment (build 1.6.0_02-b05)
      Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_02-b05, mixed mode)

      PROBLEM DESCRIPTION
      -------------------
      FileDialog focus is incorrect. In case of Linux, the focus is on the list of files in the file dialog and not at 'enter file name'

      STEPS TO REPRODUCE
      ------------------
      1) java -cp . FileDialogTest
      2) The focus will be on the file list on not on the "Enter file name" text box.

      TESTCASE DESCRIPTION
      ---------------------

      import java.awt.*;
      import java.awt.event.ActionEvent;
      import java.awt.event.ActionListener;

      class FileDialogTest
          implements ActionListener
      {

          FileDialogTest()
          {
              Frame frame = new Frame();
              Panel panel = new Panel();
              Button button = new Button("EXIT");
              button.addActionListener(this);
              FileDialog filedialog = new FileDialog(frame, "filedialog", 0);
              filedialog.setVisible(true);
              panel.add(button);
              frame.add(panel);
              frame.setSize(200, 200);
              frame.setVisible(true);
          }

          public void actionPerformed(ActionEvent actionevent)
          {
              System.exit(0);
          }

          public static void main(String args[])
          {
              new FileDialogTest();
          }
      }

            dcherepanov Dmitry Cherepanov
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: