摘要: 3.7 文本框 文本框 public class TestTextField extends JFrame { public TestTextField() { Container contentPane = getContentPane(); //文本框 JTextField jTextField 阅读全文
posted @ 2022-03-18 18:22 NeverGGp 阅读(31) 评论(0) 推荐(0)
摘要: 3.6 列表 下拉框 public class TestCombobox extends JFrame { public TestCombobox() { Container contentPane = getContentPane(); //下拉框 JComboBox jComboBox = ne 阅读全文
posted @ 2022-03-18 18:02 NeverGGp 阅读(29) 评论(0) 推荐(0)
摘要: ###3.5 按钮 图片按钮 public class TestButton extends JFrame { public TestButton(){ Container contentPane = getContentPane(); //获取资源 URL resource = TestButto 阅读全文
posted @ 2022-03-18 17:14 NeverGGp 阅读(26) 评论(0) 推荐(0)
摘要: ###3.4 面板 JPanel public class TestJPanel extends JFrame { public TestJPanel(){ Container container = this.getContentPane(); container.setLayout(new Gr 阅读全文
posted @ 2022-03-18 16:46 NeverGGp 阅读(22) 评论(0) 推荐(0)
摘要: 3.3 标签 label-icon //标签 图标操作 自己画 //图标 是一个接口,需要实现类,同时继承JFrame public class IconDemo extends JFrame implements Icon { private int width; private int heig 阅读全文
posted @ 2022-03-18 13:19 NeverGGp 阅读(27) 评论(0) 推荐(0)