Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package tugas;
- import java.applet.Applet;
- import java.awt.Color;
- import java.awt.Graphics;
- import javax.swing.JFrame;
- /*
- @author Rifky qnoy.rifky@gmail.com
- */
- public class Tugas extends JFrame{
- /**
- * @param args the command line arguments
- */
- public void paint(Graphics g){
- g.setColor(Color.red);
- g.fillRoundRect(20, 20, 60, 30,10,15);
- g.setColor(Color.white);
- g.fillOval(20, 60, 20, 20);
- g.setColor(Color.yellow);
- g.fillArc(30, 100, 30, 30, 120, 180);
- }
- public static void main(String[] args) {
- // TODO code application logic here
- Tugas tgs = new Tugas();
- tgs.setTitle("Tugas1");
- tgs.setSize(800, 600);
- tgs.setVisible(true);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement