Skip to content

Commit c8edd7e

Browse files
committed
updates
1 parent 260a7e3 commit c8edd7e

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

第13章 GUI/README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
## JFrame
2+
3+
窗口
4+
5+
| 方法声明 | 功能描述 |
6+
| -------------------------- | ---------------------------------------- |
7+
| setSize() | |
8+
| setPreferredSize() | |
9+
| setResizable() | |
10+
| setDefaultCloseOperation() | |
11+
| setVisible() | |
12+
| setContentPane() | |
13+
| pack() | 在setResizable(false)后进行pack(),防止在Windows下系统修改frame的尺寸 |
14+
| repaint() | |
15+
| addKeyListener() | |
16+
| addMouseListener() | |
17+
18+
## JPanel
19+
20+
面板
21+
22+
| 方法声明 | 功能描述 |
23+
| ------------------ | ---- |
24+
| paintComponent() | |
25+
| getPreferredSize() | |
26+
27+
## Graphics
28+
29+
| 方法声明 | 功能描述 |
30+
| ---------- | ---- |
31+
| drawOval() | |
32+
33+
### Graphics2D
34+
35+
| 方法声明 | 功能描述 |
36+
| ------------------- | ---- |
37+
| setStroke() | |
38+
| setColor() | |
39+
| draw() | |
40+
| fill() | |
41+
| addRenderingHints() | |
42+
| drawImage() | |
43+
| drawString() | |
44+
| getFontMetrics() | |
45+
46+
- Ellipse2D
47+
- BasicStroke
48+
- RenderingHints 抗锯齿
49+
- put()
50+
- FontMetrics
51+
- ImageIcon
52+
53+
## Dimension
54+
55+
## KeyAdapter
56+
57+
键盘事件监听
58+
59+
| 方法声明 | 功能描述 |
60+
| ----------- | ---- |
61+
| keyReleased | |
62+
63+
- KeyEvent
64+
65+
## MouseAdapter
66+
67+
鼠标事件监听
68+
69+
## EventQueue
70+
71+
- invokeLater()

0 commit comments

Comments
 (0)