Last active
October 8, 2019 09:10
-
-
Save dyazincahya/faeb74b80bf95964ce07c043bd3e62df to your computer and use it in GitHub Desktop.
How to Create a Chrome Icon in Applet ( JAVA )
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* DRAW GOOGLE CHROME ICON WITH JAVA APPLET | |
* | |
* @author (CAHYA DYAZIN) | |
* @github gist (https://gist.github.com/dyazincahya/faeb74b80bf95964ce07c043bd3e62df) | |
* @version (8/10/2019) | |
*/ | |
import java.awt.*; | |
import java.applet.*; | |
public class Chrome extends Applet | |
{ | |
public void paint(Graphics g) | |
{ | |
Color myYellow = new Color(255,235,59); // #FFEB3B | |
Color myRed = new Color(244,67,54); // #f44336 | |
Color myGreen = new Color(76,175,80); // #4CAF50 | |
Color myWhite = new Color(255,255,255); // #FFFFFF | |
Color myBlue = new Color(33,150,243); // #2196F3 | |
g.setColor(myYellow); | |
g.fillOval(100,100,200,200); | |
g.setColor(myRed); | |
g.fillArc(100,100,200,200,0,120); | |
g.setColor(myGreen); | |
g.fillArc(100,100,200,200,120,120); | |
g.setColor(myWhite); | |
g.fillOval(155,155,95,95); | |
g.setColor(myBlue); | |
g.fillOval(165,165,75,75); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment