(Graphics g)
| 58 | } |
| 59 | |
| 60 | public void paintComponent(Graphics g) |
| 61 | { |
| 62 | resize(); |
| 63 | |
| 64 | g.setColor(Color.WHITE); |
| 65 | |
| 66 | g.fillRect(0, 0, this.getWidth()-1, this.getHeight()-1); |
| 67 | |
| 68 | g.setColor(Color.BLACK); |
| 69 | |
| 70 | //g.drawRect(0, 0, width, height); |
| 71 | |
| 72 | Graphics2D g2d = (Graphics2D)g; |
| 73 | g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON); |
| 74 | g2d.setFont(new Font("Sans", Font.BOLD, 14)); |
| 75 | |
| 76 | String[] playersNames = graphwar.getGlobalClient().getGlobalPlayers(); |
| 77 | |
| 78 | |
| 79 | for(int i=0; i<playersNames.length; i++) |
| 80 | { |
| 81 | g2d.drawString(" "+playersNames[i], 0, entryHeight*(i+1)-5); |
| 82 | g2d.drawRect(0, entryHeight*i, this.getWidth()-1, entryHeight); |
| 83 | } |
| 84 | } |
| 85 | } |
nothing calls this directly
no test coverage detected