01: /*
02: *******************************************************************************
03: * Copyright (C) 2004-2005, International Business Machines Corporation and *
04: * others. All Rights Reserved. *
05: *******************************************************************************
06: */
07:
08: package com.ibm.icu.dev.tool.ime;
09:
10: import java.awt.Rectangle;
11: import javax.swing.Box;
12: import javax.swing.JFrame;
13: import javax.swing.JTextField;
14: import javax.swing.WindowConstants;
15:
16: public class IMETest {
17: public static void main(String[] args) {
18: String sampleText = "This is a sample\nto put into the field.";
19: Rectangle loc = new Rectangle(100, 100, 300, 300);
20: for (int i = 0; i < 2; ++i) {
21: JFrame jf = new JFrame("Test Window " + i);
22: jf
23: .setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);
24: Box box = Box.createVerticalBox();
25: box.add(new JTextField(sampleText));
26: box.add(new JTextField(sampleText));
27: jf.getContentPane().add(box);
28: jf.setBounds(loc);
29:
30: jf.setVisible(true);
31:
32: loc.x += 50;
33: loc.y += 50;
34: }
35: }
36: }
|