(Frame frame)
| 46 | |
| 47 | |
| 48 | public About(Frame frame) { |
| 49 | super(frame); |
| 50 | |
| 51 | icon = Toolkit.getLibIconX("about"); |
| 52 | width = icon.getIconWidth(); |
| 53 | height = icon.getIconHeight(); |
| 54 | |
| 55 | addMouseListener(new MouseAdapter() { |
| 56 | public void mousePressed(MouseEvent e) { |
| 57 | dispose(); |
| 58 | } |
| 59 | }); |
| 60 | |
| 61 | addKeyListener(new KeyAdapter() { |
| 62 | public void keyTyped(KeyEvent e) { |
| 63 | System.out.println(e); |
| 64 | if (e.getKeyCode() == KeyEvent.VK_ESCAPE) { |
| 65 | dispose(); |
| 66 | } |
| 67 | } |
| 68 | }); |
| 69 | |
| 70 | setSize(width, height); |
| 71 | setLocationRelativeTo(frame); |
| 72 | setVisible(true); |
| 73 | requestFocus(); |
| 74 | } |
| 75 | |
| 76 | |
| 77 | public void paint(Graphics g) { |
nothing calls this directly
no test coverage detected