1 // 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html#License 3 /* 4 ******************************************************************************* 5 * Copyright (C) 2004-2010, International Business Machines Corporation and * 6 * others. All Rights Reserved. * 7 ******************************************************************************* 8 */ 9 10 package com.ibm.icu.dev.tool.ime; 11 12 import java.awt.Rectangle; 13 14 import javax.swing.Box; 15 import javax.swing.JFrame; 16 import javax.swing.JTextField; 17 import javax.swing.WindowConstants; 18 19 public class IMETest { 20 public static void main(String[] args) { 21 String sampleText = "This is a sample\nto put into the field."; 22 Rectangle loc = new Rectangle(100, 100, 300, 300); 23 for (int i = 0; i < 2; ++i) { 24 JFrame jf = new JFrame("Test Window " + i); 25 jf.setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE); 26 Box box = Box.createVerticalBox(); 27 box.add(new JTextField(sampleText)); 28 box.add(new JTextField(sampleText)); 29 jf.getContentPane().add(box); 30 jf.setBounds(loc); 31 32 jf.setVisible(true); 33 34 loc.x += 50; 35 loc.y += 50; 36 } 37 } 38 } 39