2 * Jalview - A Sequence Alignment Editor and Viewer ($$Version-Rel$$)
3 * Copyright (C) $$Year-Rel$$ The Jalview Authors
5 * This file is part of Jalview.
7 * Jalview is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation, either version 3
10 * of the License, or (at your option) any later version.
12 * Jalview is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty
14 * of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 * PURPOSE. See the GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with Jalview. If not, see <http://www.gnu.org/licenses/>.
19 * The Jalview Authors are detailed in the 'AUTHORS' file.
23 import jalview.bin.Cache;
25 import java.awt.Dimension;
26 import java.awt.event.ActionEvent;
27 import java.awt.event.ActionListener;
28 import java.awt.event.MouseEvent;
29 import java.awt.event.MouseListener;
31 import javax.swing.JDesktopPane;
32 import javax.swing.JFrame;
33 import javax.swing.JInternalFrame;
34 import javax.swing.JMenu;
35 import javax.swing.JMenuItem;
36 import javax.swing.JTextArea;
38 import org.testng.annotations.AfterClass;
39 import org.testng.annotations.BeforeClass;
40 import org.testng.annotations.Test;
42 public class JAL1353bugdemo
46 public static void setUpBeforeClass() throws Exception
51 public static void tearDownAfterClass() throws Exception
55 volatile boolean finish = false;
58 { "Functional" }, enabled = false)
62 // final Desktop foo = new Desktop();
63 final JFrame cfoo = new JFrame("Crash Java");
64 final JDesktopPane foo = new JDesktopPane();
65 foo.setPreferredSize(new Dimension(600, 800));
66 cfoo.setSize(600, 800);
67 final JInternalFrame cont = new JInternalFrame("My Frame");
69 cont.setPreferredSize(new Dimension(400, 300));
70 cont.add(evt = new JTextArea(
71 "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"));
73 foo.add("A frame", cont);
78 final JMenu jm = new JMenu("Do");
79 JMenuItem jmi = new JMenuItem("this");
81 evt.addMouseListener(new MouseListener()
85 public void mouseReleased(MouseEvent e)
90 public void mousePressed(MouseEvent e)
92 // TODO Auto-generated method stub
97 public void mouseExited(MouseEvent e)
99 // TODO Auto-generated method stub
104 public void mouseEntered(MouseEvent e)
106 // TODO Auto-generated method stub
111 public void mouseClicked(MouseEvent e)
113 // JFrame parent = new JFrame();
114 // parent.setBounds(foo.getBounds());
115 // JPanel oo = new JPanel();
117 // oo.setVisible(true);
118 // parent.setVisible(true);
119 EditNameDialog end = new EditNameDialog("Sequence Name",
120 "Sequence Description", "label 1", "Label 2",
121 "Try and drag between the two text fields", foo);// );cont.getRootPane());
122 assert (end != null);
126 cont.setVisible(true);
128 jmi.addActionListener(new ActionListener()
132 public void actionPerformed(ActionEvent arg0)
134 EditNameDialog end = new EditNameDialog("Sequence Name",
135 "Sequence Description", "label 1", "Label 2",
136 "Try and drag between the two text fields", cont);
137 assert (end != null);
141 foo.setVisible(true);
142 cfoo.setVisible(true);
148 } catch (InterruptedException x)