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 void setUpJvOptionPane()
44 JvOptionPane.setInteractiveMode(false);
45 JvOptionPane.setMockResponse(JvOptionPane.CANCEL_OPTION);
48 @BeforeClass(alwaysRun = true)
49 public static void setUpBeforeClass() throws Exception
53 @AfterClass(alwaysRun = true)
54 public static void tearDownAfterClass() throws Exception
58 volatile boolean finish = false;
60 @Test(groups = { "Functional" }, enabled = false)
64 // final Desktop foo = new Desktop();
65 final JFrame cfoo = new JFrame("Crash Java");
66 final JDesktopPane foo = new JDesktopPane();
67 foo.setPreferredSize(new Dimension(600, 800));
68 cfoo.setSize(600, 800);
69 final JInternalFrame cont = new JInternalFrame("My Frame");
70 cont.setPreferredSize(new Dimension(400, 400));
71 String msg = "This is a dummy string. See the dummy string go.\n";
76 JTextArea evt = new JTextArea(
77 "Click here and drag text over this window to freeze java.\n\n"
81 foo.add("A frame", cont);
86 // final JMenu jm = new JMenu("Do");
87 // JMenuItem jmi = new JMenuItem("this");
89 evt.addMouseListener(new MouseAdapter()
93 public void mouseClicked(MouseEvent e)
95 // JFrame parent = new JFrame();
96 // parent.setBounds(foo.getBounds());
97 // JPanel oo = new JPanel();
99 // oo.setVisible(true);
100 // parent.setVisible(true);
101 EditNameDialog end = new EditNameDialog("Sequence Name",
102 "Sequence Description", "label 1", "Label 2",
103 "Try and drag between the two text fields", foo);// );cont.getRootPane());
104 assert (end != null);
108 cont.setVisible(true);
110 // jmi.addActionListener(new ActionListener()
114 // public void actionPerformed(ActionEvent arg0)
116 // EditNameDialog end = new EditNameDialog("Sequence Name",
117 // "Sequence Description", "label 1", "Label 2",
118 // "Try and drag between the two text fields", cont);
119 // assert (end != null);
123 foo.setVisible(true);
124 cfoo.setVisible(true);
130 } catch (InterruptedException x)