8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * Portions Copyright (c) 2011 IBM Corporation
26 */
27
28 /* @test
29 * @bug 7049024
30 * @summary DnD fails with JTextArea and JTextField
31 * @author Sean Chou
32 */
33
34 import sun.awt.SunToolkit;
35
36 import javax.swing.*;
37 import javax.swing.text.DefaultCaret;
38 import java.awt.*;
39 import java.awt.datatransfer.Clipboard;
40 import java.awt.datatransfer.DataFlavor;
41
42 public class bug7049024 {
43 public static Clipboard clipboard = null;
44
45 public static JTextField textField = null;
46
47 // This button is used to move focus away from textField.
48 public static JButton button = null;
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * Portions Copyright (c) 2011 IBM Corporation
26 */
27
28 /*
29 * @test
30 * @key headful
31 * @bug 7049024
32 * @summary DnD fails with JTextArea and JTextField
33 * @author Sean Chou
34 */
35
36 import sun.awt.SunToolkit;
37
38 import javax.swing.*;
39 import javax.swing.text.DefaultCaret;
40 import java.awt.*;
41 import java.awt.datatransfer.Clipboard;
42 import java.awt.datatransfer.DataFlavor;
43
44 public class bug7049024 {
45 public static Clipboard clipboard = null;
46
47 public static JTextField textField = null;
48
49 // This button is used to move focus away from textField.
50 public static JButton button = null;
|