绊夏微凉

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2021年4月14日

摘要: GUI-键盘监听 ​ 键盘监听:使用键盘监听适配器(KeyAdapter),不用重写所有方法。 public class Application { public static void main(String[] args) { new MyFrame(); } } class MyFrame e 阅读全文
posted @ 2021-04-14 10:50 绊夏微凉 阅读(107) 评论(0) 推荐(0)

摘要: GUI-窗口监听 ​ 窗口监听:一般使用窗口的适配器(WindowAdapter),不用重写所有的方法。 ​ 窗口监听常用的方法: ​ windowActivated:窗口被激活 ​ windowClosing:窗口关闭 public class Application { public stati 阅读全文
posted @ 2021-04-14 10:48 绊夏微凉 阅读(107) 评论(0) 推荐(0)

摘要: GUI-画笔 ​ 自定义类,继承frame,重写paint方法 public class Application { public static void main(String[] args) { new MyFrame(); } } class MyFrame extends Frame{ pu 阅读全文
posted @ 2021-04-14 10:44 绊夏微凉 阅读(82) 评论(0) 推荐(0)

摘要: GUI-鼠标监听 ​ 鼠标监听:使用鼠标监听的适配器(MouseAdapter),不用重写所有方法。 public class Application { public static void main(String[] args) { new MyFrame(); } } class MyFram 阅读全文
posted @ 2021-04-14 10:42 绊夏微凉 阅读(148) 评论(0) 推荐(0)