|
Duplicate :
|
|
|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
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
|