| Conditions | 1 |
| Total Lines | 6 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | package example; |
||
| 15 | protected void setup() { |
||
| 16 | getDrawingPanel().setBackground(Color.BLACK); |
||
| 17 | (new Text(getDrawingPanel().getWidth() + " × " + getDrawingPanel().getHeight() + " pixels", 100, 100, getDrawingPanel())).setStrokeColor(Color.WHITE); |
||
|
|
|||
| 18 | (new Text("Esc to exit", 100, 200, getDrawingPanel())).setStrokeColor(Color.WHITE); |
||
| 19 | getDrawingPanel().addKeyListener(this); |
||
| 20 | getDrawingPanel().requestFocus(); |
||
| 21 | } |
||
| 44 |
You may want to use
try {} ... finally {}to close the resource or use the (relatively) new try-with-resources capability.