Details
-
Bug
-
Resolution: Fixed
-
P3
-
7
-
Problem occurs when running Java on linux or sparc(solaris 11.1) when tunneling X over ssh using CygwinX default wm
-
b87
-
x86
-
linux
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8018672 | 7u45 | Anton Tarasov | P3 | Closed | Fixed | b01 |
JDK-8011975 | 7u40 | Anton Tarasov | P3 | Closed | Fixed | b22 |
Description
FULL PRODUCT VERSION :
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux Celsius 3.2.6 #1 SMP Wed Feb 15 12:04:35 CET 2012 i686 Intel(R) Pentium(R) D CPU 3.20GHz GenuineIntel GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
XWindow manager: IceWM. No KDE, Gnome or such.
A DESCRIPTION OF THE PROBLEM :
1. A JTextField created as a child of the main JFrame _never_ gets the focus when the user clicks into it.
2. A JTextField in a dynamically created JDialog loses the focus as soon as the cursor is moved out of the parent JFrame, and _never_ gets it back.
No such problems on Windows XP!
REGRESSION. Last worked in version 6u29
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start attached test program.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text field should gain focus when clicked into.
ACTUAL -
Text field gets focus once and then loses it forever, or doesn't get it at all.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
// Focus bug
public class Focusbug
extends JFrame
{
JDialog dia;
Focusbug(String titel)
{
super(titel);
setDefaultCloseOperation(EXIT_ON_CLOSE);
dia = new JDialog(this);
dia.setBounds(10, 10, 200,70);
dia.add(new JTextField("One-way focus"));
JButton start = new JButton("Create dialog");
start.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
dia.setVisible(true);
}
});
add(start, BorderLayout.NORTH);
JPanel panel = new JPanel();
panel.add(new JTextField("No focus here"));
add(panel, BorderLayout.SOUTH);
}
static public void main(String[] args)
{
Focusbug focusbug = new Focusbug("Focusbug");
focusbug.setBounds(100, 100, 250, 100);
focusbug.setVisible(true);
}
}
---------- END SOURCE ----------
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b04)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Linux Celsius 3.2.6 #1 SMP Wed Feb 15 12:04:35 CET 2012 i686 Intel(R) Pentium(R) D CPU 3.20GHz GenuineIntel GNU/Linux
EXTRA RELEVANT SYSTEM CONFIGURATION :
XWindow manager: IceWM. No KDE, Gnome or such.
A DESCRIPTION OF THE PROBLEM :
1. A JTextField created as a child of the main JFrame _never_ gets the focus when the user clicks into it.
2. A JTextField in a dynamically created JDialog loses the focus as soon as the cursor is moved out of the parent JFrame, and _never_ gets it back.
No such problems on Windows XP!
REGRESSION. Last worked in version 6u29
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Start attached test program.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Text field should gain focus when clicked into.
ACTUAL -
Text field gets focus once and then loses it forever, or doesn't get it at all.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
// Focus bug
public class Focusbug
extends JFrame
{
JDialog dia;
Focusbug(String titel)
{
super(titel);
setDefaultCloseOperation(EXIT_ON_CLOSE);
dia = new JDialog(this);
dia.setBounds(10, 10, 200,70);
dia.add(new JTextField("One-way focus"));
JButton start = new JButton("Create dialog");
start.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent e)
{
dia.setVisible(true);
}
});
add(start, BorderLayout.NORTH);
JPanel panel = new JPanel();
panel.add(new JTextField("No focus here"));
add(panel, BorderLayout.SOUTH);
}
static public void main(String[] args)
{
Focusbug focusbug = new Focusbug("Focusbug");
focusbug.setBounds(100, 100, 250, 100);
focusbug.setVisible(true);
}
}
---------- END SOURCE ----------
Attachments
Issue Links
- backported by
-
JDK-8011975 JTextField doesn't get focus or loses focus forever
- Closed
-
JDK-8018672 JTextField doesn't get focus or loses focus forever
- Closed
- duplicates
-
JDK-8009224 JDK7 looses focus under e16 window manager
- Closed