摘要:
弹窗窗口的建立: 1 //弹窗的窗口 2 class MyDialogDemo extends JDialog{ 3 public MyDialogDemo() { 4 this.setVisible(true); 5 this.setBounds(100,100,500,500); 6 this. 阅读全文
posted @ 2022-04-09 19:24
jue1e0
阅读(220)
评论(0)
推荐(0)
摘要:
1.JFrame(会自动携带关闭监听器): 1 public static void init() { 2 JFrame frame = new JFrame("JFrame窗口"); 3 frame.setVisible(true); 4 frame.setBounds(100,100,200,2 阅读全文
posted @ 2022-04-09 19:21
jue1e0
阅读(194)
评论(0)
推荐(0)
摘要:
1.键盘监听器: 1 class KeyFrame extends Frame { 2 public KeyFrame() { 3 setBounds(1,2,300,400); 4 setVisible(true); 5 6 this.addKeyListener(new KeyAdapter() 阅读全文
posted @ 2022-04-09 19:13
jue1e0
阅读(834)
评论(0)
推荐(0)
摘要:
文本框的使用: 1 public TextField num1,num2,num3; 2 num1 = new TextField(10);//表示最多可输入10字节 3 num2 = new TextField(10); 4 num3 = new TextField(20); 1 public c 阅读全文
posted @ 2022-04-09 19:04
jue1e0
阅读(151)
评论(0)
推荐(0)
摘要:
题目: 根据值val将链表划分为小于val的左半区,等于val的中间半区,大于val的右半区 方法1:将其转为node数组,用数组的思想将其实现(需额外空间,且实现还更复杂) 代码解析: 1 public static void PartitionList1(MyLink list,int val) 阅读全文
posted @ 2022-04-09 16:34
jue1e0
阅读(89)
评论(0)
推荐(0)