Guest User

Untitled

a guest
Jul 15th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. import javax.swing.JFrame;
  2. import javax.swing.JPanel;
  3. import java.awt.Graphics;
  4. import java.awt.Color;
  5.  
  6. public class RandomColor extends JFrame
  7. {
  8. public void RandomColor(){
  9. JFrame f = new JFrame("NEW");
  10. f.setDefaultCloseOperation(EXIT_ON_CLOSE);
  11. JPanel Graph = new JPanel();
  12. f.add(Graph);
  13. f.setVisible(true);
  14.  
  15. }
  16.  
  17. private void PaintComponent(Graphics g)
  18. {
  19. g.setColor(new Color(123,123,123));
  20. g.drawString("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", 345, 456);
  21. }
  22.  
  23.  
  24. public static void main(String[] args)
  25. {
  26. new RandomColor();
  27. }
  28. }
Add Comment
Please, Sign In to add comment