3 import static org.junit.Assert.*;
4 import jalview.bin.Cache;
6 import java.awt.Component;
7 import java.awt.Dimension;
8 import java.awt.event.ActionEvent;
9 import java.awt.event.ActionListener;
10 import java.awt.event.MouseEvent;
11 import java.awt.event.MouseListener;
13 import javax.swing.JDesktopPane;
14 import javax.swing.JFrame;
15 import javax.swing.JInternalFrame;
16 import javax.swing.JMenu;
17 import javax.swing.JMenuItem;
18 import javax.swing.JPanel;
19 import javax.swing.JTextArea;
21 import org.junit.AfterClass;
22 import org.junit.BeforeClass;
23 import org.junit.Test;
25 public class JAL1353bugdemo
29 public static void setUpBeforeClass() throws Exception
34 public static void tearDownAfterClass() throws Exception
37 volatile boolean finish=false;
43 // final Desktop foo = new Desktop();
44 final JFrame cfoo = new JFrame("Crash Java");
45 final JDesktopPane foo=new JDesktopPane();
46 foo.setPreferredSize(new Dimension(600,800));
47 cfoo.setSize(600, 800);
48 final JInternalFrame cont = new JInternalFrame("My Frame");
50 cont.setPreferredSize(new Dimension(400, 300));
51 cont.add(evt=new JTextArea("Click here and drag text over this window to freeze java.\n\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\nThis is a dummy string. See teh dummy string go.\n"));
53 foo.add("A frame",cont);
58 final JMenu jm = new JMenu("Do");
59 JMenuItem jmi=new JMenuItem("this");
61 evt.addMouseListener(new MouseListener()
65 public void mouseReleased(MouseEvent e)
70 public void mousePressed(MouseEvent e)
72 // TODO Auto-generated method stub
77 public void mouseExited(MouseEvent e)
79 // TODO Auto-generated method stub
84 public void mouseEntered(MouseEvent e)
86 // TODO Auto-generated method stub
91 public void mouseClicked(MouseEvent e)
93 // JFrame parent = new JFrame();
94 // parent.setBounds(foo.getBounds());
95 // JPanel oo = new JPanel();
97 // oo.setVisible(true);
98 // parent.setVisible(true);
99 EditNameDialog end =new EditNameDialog("Sequence Name", "Sequence Description","label 1", "Label 2", "Try and drag between the two text fields", foo);//);cont.getRootPane());
104 cont.setVisible(true);
106 jmi.addActionListener(new ActionListener()
110 public void actionPerformed(ActionEvent arg0)
112 EditNameDialog end =new EditNameDialog("Sequence Name", "Sequence Description","label 1", "Label 2", "Try and drag between the two text fields", cont);
117 foo.setVisible(true);
118 cfoo.setVisible(true);
123 } catch (InterruptedException x) {}