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

Cannot get focus on JTextField after showing dialog box (NETSCAPE & KDE)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.4.1
    • client-libs
    • x86
    • linux



      Name: dk106046 Date: 07/26/2002

      Turbo Linux 7.0

      1.4.1-rc-b17


      ------------
      Testcase - TestApplet.java
      -------------------------------------------------------------------------------------------------------------------------
      public class TestApplet extends JApplet {
          public void init() {
              JTextField testfield = new JTextField(20);
              getContentPane().add(testfield, BorderLayout.NORTH);
              getContentPane().add(createDialogButton(), BorderLayout.CENTER);
          }

          public JButton createDialogButton() {
              Action a = new AbstractAction("TestDialogButton") {
                  public void actionPerformed(ActionEvent e) {
                      JOptionPane.showMessageDialog(new JPanel(), "Test Message");
                  }
              };
              JButton testbutton = new JButton();
              testbutton.setAction(a);
              return testbutton;
          }
      }
      ----------------------------------------------------------------------------------------------------------------------------------------
      1. Run as an applet using NETSCAPE with a KDE desktop.

      2. Move focus on JTextField and press any key
           -> Any characters can be entered in JTextField

      3. Click 'TestDialogButton'
           -> Message dialog box appears.

      4. Click 'OK' button
           -> Message dialog box disappears.

      5. Click on JTextField
           -> Cannot move focus on JTextField and cannot input any chars. -> problem!

      << Expected result >>
      Focus should be move to JTextField even after showing dialog box.

      << Note >>
      This problem occurs with KDE desktop, not occur with Gnome desktop.
      This problem does not occur in case of appletviewer.

      This does look very similar to 4396447 however the workaround given there (to resize the browser window) does not work for this test case so I suspect it is not exactly the same.

      ======================================================================

            dmikhalksunw Denis Mikhalkin (Inactive)
            dkorbel David Korbel (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: