
Java
latexmath
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
【paint和paintComponent的区别,兼谈Canvas和JPanel】
问题背景 最近抽时间读了《Core Java》10th edition, 在Graphics Programming中讲到显示message,只需要override组件的paintComponent方法,而在阅读另外一本《Java 2D游戏编程入门》时,作者直接使用paint方法,并非paintComponent, 对于二者的区别,不甚了解,网上有很多关于此话题的分析版本,看的一头雾水,原创 2017-11-03 13:53:41 · 1297 阅读 · 0 评论 -
基于MVC架构的GUI设计
问题背景 复杂的GUI设计需要良好的框架结构,在阅读一些游戏源码时,看到有些ugly的设计,十分不爽,本文主要探讨gui项目的模型(model)视图(view)控制器(Controller)的分配与布置。问题的解决方法和思路 (1) View:主类 继承 JFrame (2) Model:主类私有成员为,在主类的构造函数中初始化 (3)Control原创 2017-11-03 14:23:37 · 1901 阅读 · 0 评论 -
[Java读书笔记]之Swing
Chapter 12 in Core Java1. The defalut layout of JFrame is Borderlayout, and extended to the boundary automatically.2. The default layout of JPanel is FlowLayout, and centered automatically.3.原创 2017-11-05 11:10:52 · 296 阅读 · 0 评论 -
[Java笔记]之Concurrency
1.Steps for creating a thread:Place the code for the task into the run method of a class that implements the Runnable interface.Construct a Thread object from the Runnable. Threat t=new Thread(原创 2017-11-05 12:18:31 · 186 阅读 · 0 评论