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.MouseAdapter;
27 import java.awt.event.MouseEvent;
29 import javax.swing.JDesktopPane;
30 import javax.swing.JFrame;
31 import javax.swing.JInternalFrame;
32 import javax.swing.JTextArea;
34 import org.testng.annotations.AfterClass;
35 import org.testng.annotations.BeforeClass;
36 import org.testng.annotations.Test;
38 public class JAL1353bugdemo
41 @BeforeClass(alwaysRun = true)
42 public static void setUpBeforeClass() throws Exception
46 @AfterClass(alwaysRun = true)
47 public static void tearDownAfterClass() throws Exception
51 volatile boolean finish = false;
53 @Test(groups = { "Functional" }, enabled = false)
57 // final Desktop foo = new Desktop();
58 final JFrame cfoo = new JFrame("Crash Java");
59 final JDesktopPane foo = new JDesktopPane();
60 foo.setPreferredSize(new Dimension(600, 800));
61 cfoo.setSize(600, 800);
62 final JInternalFrame cont = new JInternalFrame("My Frame");
63 cont.setPreferredSize(new Dimension(400, 400));
64 String msg = "This is a dummy string. See the dummy string go.\n";
69 JTextArea evt = new JTextArea(
70 "Click here and drag text over this window to freeze java.\n\n"
74 foo.add("A frame", cont);
79 // final JMenu jm = new JMenu("Do");
80 // JMenuItem jmi = new JMenuItem("this");
82 evt.addMouseListener(new MouseAdapter()
86 public void mouseClicked(MouseEvent e)
88 // JFrame parent = new JFrame();
89 // parent.setBounds(foo.getBounds());
90 // JPanel oo = new JPanel();
92 // oo.setVisible(true);
93 // parent.setVisible(true);
94 EditNameDialog end = new EditNameDialog("Sequence Name",
95 "Sequence Description", "label 1", "Label 2",
96 "Try and drag between the two text fields", foo);// );cont.getRootPane());
101 cont.setVisible(true);
103 // jmi.addActionListener(new ActionListener()
107 // public void actionPerformed(ActionEvent arg0)
109 // EditNameDialog end = new EditNameDialog("Sequence Name",
110 // "Sequence Description", "label 1", "Label 2",
111 // "Try and drag between the two text fields", cont);
112 // assert (end != null);
116 foo.setVisible(true);
117 cfoo.setVisible(true);
123 } catch (InterruptedException x)