JDK-4721269 : Cannot get focus on JTextField after showing dialog box (NETSCAPE & KDE)
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 1.4.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • CPU: x86
  • Submitted: 2002-07-26
  • Updated: 2002-11-13
  • Resolved: 2002-11-13
Related Reports
Duplicate :  
Relates :  
Description

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.

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

Comments
EVALUATION Perhaps related to 4670697? ###@###.### 2002-07-26 The symptoms look very similiar to the one from 4767070. Moreover, in the workspace with the fix for 4767070(it is not integrated yet) this bug is not reproducible. This bug has been fixed by the fix for 4767070. Closing as duplicate.
24-08-2004

WORK AROUND Name: dk106046 Date: 07/26/2002 If you move focus to the Java Console window, you can get back focus on JTextField. (Not feasible as a workaround) ======================================================================
24-08-2004