:: my frenz ::

:: leave ur link here ::

:: c0mey x bas neyh ::

salam n wink2* ;)
entry lepas fara da wat sal coding muka senyum kan..
kali neyh wat coding nak lukis bas plak..

import javax.swing.JApplet; //import class JApplet
import java.awt.*; //import package awt
public class exercise3 extends JApplet {
    public void paint(Graphics g)
    {
        super.paint(g); //call superclass version of method paint
       
        g.setColor(Color.MAGENTA); //set the color
        g.fillRoundRect(50,30,250,80,20,20);
     
        g.setColor(Color.ORANGE); //set the color
        g.fillRect(88,50,20,60);  //draw the rectangle and fill it with color
       
        g.setColor(Color.BLACK); //set the color
        g.drawRect(88,50,20,60); //draw the rectangle
        g.drawRoundRect(50,30,250,80,20,20); //draw the Roundrectangle
       
        g.setColor(Color.LIGHT_GRAY); //set the color
        g.fillRoundRect(60,40,20,30,10,10); //draw the Roundrectangle and fill it with color
        g.fillRoundRect(120,40,20,30,10,10); //draw the Roundrectangle and fill it with color
        g.fillRoundRect(150,40,20,30,10,10); //draw the Roundrectangle and fill it with color
        g.fillRoundRect(180,40,20,30,10,10); //draw the Roundrectangle and fill it with color
        g.fillRoundRect(210,40,20,30,10,10); //draw the Roundrectangle and fill it with color
        g.fillRoundRect(240,40,20,30,10,10); //draw the Roundrectangle and fill it with color
        g.fillRoundRect(270,40,20,30,10,10); //draw the Roundrectangle and fill it with color
       
        g.setColor(Color.BLACK); //set the color
        g.drawRoundRect(60,40,20,30,10,10); //draw the Roundrectangle
        g.drawRoundRect(120,40,20,30,10,10); //draw the Roundrectangle
        g.drawRoundRect(150,40,20,30,10,10); //draw the Roundrectangle
        g.drawRoundRect(180,40,20,30,10,10); //draw the Roundrectangle
        g.drawRoundRect(210,40,20,30,10,10); //draw the Roundrectangle
        g.drawRoundRect(240,40,20,30,10,10); //draw the Roundrectangle
        g.drawRoundRect(270,40,20,30,10,10); //draw the Roundrectangle
     
               
        g.setColor(Color.BLACK); //set the color
        g.fillOval(120,100,20,20); //draw an oval and fill it with color
        g.fillOval(220,100,20,20); //draw an oval and fill it with color
        g.fillRect(300,90,10,10); //draw an oval and fill it with color
       
        g.drawString("Let's Go Travel",160,90); //write a string with it coordinate
       
    }
}
so.. this is the output..
jangan gelak tau..






:: thank's 4 reading ::

No comments: