import java.awt.*;
public class text {
public static void main(String[] args) {
Frame f =
new Frame(
"TextField");
f.setSize(
500,
200);
f.setLayout(
new FlowLayout(FlowLayout.CENTER));
f.add(
new Label(
"Your Name:"));
f.add(
new TextField(
30));
f.add(
new Label(
"What's your opinion of eating fruit:"));
f.add(
new TextArea(
"I think ",
3,
60));
f.setVisible(
true);
}
}
转载请注明原文地址: https://ju.6miu.com/read-15823.html