[classlib][swing] hang up when call JDialog.setVisible
------------------------------------------------------
Key: HARMONY-4838
URL: https://issues.apache.org/jira/browse/HARMONY-4838
Project: Harmony
Issue Type: Bug
Components: Classlib
Environment: Win32
Reporter: Chunrong Lai
Below is the reproducer. SwingUtilities.invokeLater schedules a job for the event-dispatching
thread but it does not impact the result of hang up.
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
//import javax.swing.SwingUtilities;
public class TestRunner
{
public static void main(String[] args)
{
//javax.swing.SwingUtilities.invokeLater(new Runnable() {
// public void run() {
JFrame frame = new JFrame();
frame.setDefaultCloseOperation(frame.EXIT_ON_CLOSE);
frame.setBounds(200, 200, 400, 300);
frame.setVisible(true);
final JDialog dialog = new JDialog(frame, true);
dialog.setBounds(400, 400, 50, 50);
JButton button = new JButton("aaa");
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
dialog.setVisible(true);
System.out.println("Can I see it at the mean time?");
}});
dialog.add(button);
dialog.setVisible(true);
System.out.println("fsafasfsfsfasfasfs");
//} //end of run
//}); //end of invokeLater
} //end of main
} //end of TestRunner
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|