brandon1000

Status paint code

Aug 1st, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. private final Color color1 = new Color(255, 255, 255);
  2. private final Color color2 = new Color(0, 0, 0);
  3. public String Status;
  4. private final BasicStroke stroke1 = new BasicStroke(1);
  5.  
  6. private final Font font1 = new Font("Arial", 0, 20);
  7. private final Font font2 = new Font("Arial", 0, 10);
  8.  
  9. public void onRepaint(Graphics g1) {
  10. Graphics2D g = (Graphics2D)g1;
  11. g.setColor(color1);
  12. g.fillRect(22, 357, 468, 87);
  13. g.setColor(color2);
  14. g.setStroke(stroke1);
  15. g.drawRect(22, 357, 468, 87);
  16. g.setFont(font1);
  17. g.drawString("INFO", 223, 378);
  18. g.setFont(font2);
  19. g.drawString("Status:" + Status, 26, 395);
  20. }
Advertisement
Add Comment
Please, Sign In to add comment