Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import javax.swing.JPanel;
- import javax.swing.JFrame;
- import java.awt.*;
- public class lines extends JFrame
- {
- public void Lines(Graphics g)
- {
- for (int i=0;i<=20;i++)
- {
- g.setColor(Color.BLUE);
- g.drawLine(15*i,15*i,600-15*i,10*i);
- }
- g.drawLine(0,0,300,200);
- g.drawLine(600,0,300,200);
- }
- public static void main (String [] args) //frame
- {
- lines panel = new lines();
- JFrame application = new JFrame();
- application.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
- application.setSize(600, 200);
- application.setVisible(true);
- }
- }
Add Comment
Please, Sign In to add comment