-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b81
-
generic, x86
-
generic, windows_xp
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2134657 | 5.0u10 | Mikhail Lapshin | P3 | Resolved | Fixed | b01 |
FULL PRODUCT VERSION :
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Suse Linux 9.3
Linux xitx00ha 2.6.8-24.16-smp #1 SMP Thu Jun 2 12:09:57 UTC 2005 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
This Bug did not occur on one of our windows test systems, only on the linux test systems
Try a focus change with tab. It leads to an endless loop. regardless of using verify or shouldYieldFocus.
public class TestInputVerifyOptionPaneBug {
public static void main(String[] pArgs) throws Exception {
final JTextField t1 = new JTextField();
t1.setInputVerifier(new InputVerifier() {
public boolean verify(JComponent input) {
JOptionPane.showMessageDialog(input, "test");
return true;
}
});
final JTextField t2 = new JTextField();
JFrame frame = new JFrame();
frame.getContentPane().add(t1, BorderLayout.NORTH);
frame.getContentPane().add(t2, BorderLayout.SOUTH);
frame.setVisible(true);
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see description
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a focus change to the second textfield
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JTextField;
import javax.swing.InputVerifier;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.JFrame;
import java.awt.BorderLayout;
/public class TestInputVerifyOptionPaneBug {
public static void main(String[] pArgs) throws Exception {
final JTextField t1 = new JTextField();
t1.setInputVerifier(new InputVerifier() {
public boolean verify(JComponent input) {
JOptionPane.showMessageDialog(input, "test");
return true;
}
});
final JTextField t2 = new JTextField();
JFrame frame = new JFrame();
frame.getContentPane().add(t1, BorderLayout.NORTH);
frame.getContentPane().add(t2, BorderLayout.SOUTH);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
no workaround
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Suse Linux 9.3
Linux xitx00ha 2.6.8-24.16-smp #1 SMP Thu Jun 2 12:09:57 UTC 2005 i686 i686 i386 GNU/Linux
A DESCRIPTION OF THE PROBLEM :
This Bug did not occur on one of our windows test systems, only on the linux test systems
Try a focus change with tab. It leads to an endless loop. regardless of using verify or shouldYieldFocus.
public class TestInputVerifyOptionPaneBug {
public static void main(String[] pArgs) throws Exception {
final JTextField t1 = new JTextField();
t1.setInputVerifier(new InputVerifier() {
public boolean verify(JComponent input) {
JOptionPane.showMessageDialog(input, "test");
return true;
}
});
final JTextField t2 = new JTextField();
JFrame frame = new JFrame();
frame.getContentPane().add(t1, BorderLayout.NORTH);
frame.getContentPane().add(t2, BorderLayout.SOUTH);
frame.setVisible(true);
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
see description
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
a focus change to the second textfield
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
import javax.swing.JTextField;
import javax.swing.InputVerifier;
import javax.swing.JComponent;
import javax.swing.JOptionPane;
import javax.swing.JFrame;
import java.awt.BorderLayout;
/public class TestInputVerifyOptionPaneBug {
public static void main(String[] pArgs) throws Exception {
final JTextField t1 = new JTextField();
t1.setInputVerifier(new InputVerifier() {
public boolean verify(JComponent input) {
JOptionPane.showMessageDialog(input, "test");
return true;
}
});
final JTextField t2 = new JTextField();
JFrame frame = new JFrame();
frame.getContentPane().add(t1, BorderLayout.NORTH);
frame.getContentPane().add(t2, BorderLayout.SOUTH);
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
no workaround
- backported by
-
JDK-2134657 REGRESSION: InputVerifier and JOptionPane
-
- Resolved
-
- duplicates
-
JDK-6364869 REGRESSION: InputVerifier calling showMessageDialog causes infinite loop
-
- Closed
-
- relates to
-
JDK-6323261 1.4.0 REGRESSION: JFrame is not in front after call to setVisible(true)
-
- Closed
-
-
JDK-6329055 REGRESSION: InputVerifier don't work on JTextField when keyboard is used to change focus
-
- Closed
-
-
JDK-6210088 The fix for 4774166 need to be changed
-
- Resolved
-