1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| public void paint(Graphics2D poGraphics2D) { poGraphics2D.setBackground(moTransparent); poGraphics2D.clearRect(0, 0, width, height); poGraphics2D.setColor(Color.WHITE); poGraphics2D.drawString("" + System.currentTimeMillis(), poGraphics2D.getFontMetrics().getMaxAscent(), height - poGraphics2D.getFontMetrics().getMaxAscent()); poGraphics2D.setColor(Color.WHITE); poGraphics2D.drawString("FPS : " + miFPS, poGraphics2D.getFontMetrics().getMaxAscent(), height - poGraphics2D.getFontMetrics().getMaxAscent() * 2); poGraphics2D.setComposite(moComposite); poGraphics2D.setColor(moCrossHairColor); poGraphics2D.fillOval(639, 511, 2, 2); poGraphics2D.drawLine(620, 510, 638, 492); poGraphics2D.drawLine(620, 514, 638, 532); poGraphics2D.drawLine(660, 510, 642, 492); poGraphics2D.drawLine(660, 514, 642, 532); poGraphics2D.setColor(Color.BLACK); poGraphics2D.drawOval(5, 5, 200, 200); poGraphics2D.setColor(Color.GREEN); poGraphics2D.fillOval(5, 5, 200, 200); poGraphics2D.setColor(Color.WHITE); poGraphics2D.fillRect(104, 5, 2, 105); } |