wangmaster

Untitled

Oct 31st, 2016
67
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.JPanel;
  2. import javax.swing.JFrame;
  3. import java.awt.*;
  4. public class lines extends JFrame
  5. {
  6. public void Lines(Graphics g)
  7. {
  8. for (int i=0;i<=20;i++)
  9. {
  10. g.setColor(Color.BLUE);
  11. g.drawLine(15*i,15*i,600-15*i,10*i);
  12. }
  13. g.drawLine(0,0,300,200);
  14. g.drawLine(600,0,300,200);
  15. }
  16. public static void main (String [] args) //frame
  17. {
  18. lines panel = new lines();
  19. JFrame application = new JFrame();
  20. application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
  21. application.setSize(600, 200);
  22. application.setVisible(true);
  23. }
  24. }
Add Comment
Please, Sign In to add comment