import javax.swing.JTextArea;
import javax.swing.JTextField;
public class TextTest extends JFrame
{
JTextField tf;
JTextArea ta;
public TextTest()
{
this.setSize(400, 300);
this.setVisible(true);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
tf = new JTextField();
ta = new JTextArea(5, 20);
add(tf, "North");
add(ta);
}
public static void main(String[] args)
{
new TextTest();
}
}
result)
댓글 없음:
댓글 쓰기