62,620
社区成员
发帖
与我相关
我的任务
分享package swing;
import java.awt.BorderLayout;
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.JTextField;
public class Test extends JFrame {
private JTextArea textArea_1;
private JTextField textField;
private JTextArea textArea;
/**
* Launch the application
* @param args
*/
public static void main(String args[]) {
try {
Test frame = new Test();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Create the frame
*/
public Test() {
super();
getContentPane().setLayout(null);
textField = new JTextField();
textField.setText("┬");
textField.setBounds(10, 22, 90, 21);
getContentPane().add(textField);
textArea_1 = new JTextArea();
textArea_1.setBounds(10, 82, 87, 156);
textArea_1.setText("┬");
getContentPane().add(textArea_1);
setBounds(100, 100, 500, 375);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//getContentPane().add(textArea, BorderLayout.CENTER);
//
}
}