Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.*;
- import javax.swing.*;
- public class graphics extends JFrame{
- public graphics(){
- super();
- }
- public void paint(Graphics g){
- g.drawLine(10,10,150,150);
- g.drawArc(30, 30, 45, 45, 100, 100);
- g.drawRect(175, 175, 200, 200);
- g.drawString("Hej!", 75, 75);
- g.drawOval(175, 175, 200, 200);
- }
- public static void main(String arg[]){
- graphics frame = new graphics();
- frame.setSize(1000,1000);
- frame.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement