文本框
-
文本框
import javax.swing.*; import java.awt.*; public class TestTextDemo01 extends JFrame { public TestTextDemo01(){ Container container = getContentPane(); TextField textField1 = new TextField("hello"); TextField textField2 = new TextField("world",20); container.add(textField1,BorderLayout.NORTH); container.add(textField2,BorderLayout.SOUTH); this.setVisible(true); this.setSize(100,100); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } public static void main(String[] args) { new TestTextDemo01(); } }
import javax.swing.*; import java.awt.*; public class TestTextDemo02 extends JFrame{ public TestTextDemo02(){ Container container = getContentPane(); //面板 JPasswordField passwordField = new JPasswordField();//**** passwordField.setEchoChar('*'); container.add(passwordField); this.setVisible(true); this.setSize(200,150); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } public static void main(String[] args) { new TestTextDemo02(); } }
import javax.swing.*; import java.awt.*; public class TestTextDemo03 extends JFrame { public TestTextDemo03(){ Container container = this.getContentPane(); JTextArea textArea = new JTextArea(20,30); JScrollPane scrollPane = new JScrollPane(textArea); container.add(scrollPane); this.setVisible(true); this.setSize(200,300); this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE); } public static void main(String[] args) { new TestTextDemo03(); } }
我的一生
第1章-废物的一生
第50章-糟糕的婴儿
第300章-莫欺少年穷
第600章-莫欺中年穷
第1000章-莫欺老年穷
第1100章-不详的离去
第1101章-棺材板的震动
第1150章-盗墓贼的眼泪
第1200章-死者为大

浙公网安备 33010602011771号