Java Code of Shapes for Graphical User Interface: For Circle: import java.awt.*; import java.awt.geom.*; /** * A circle that can be manipulated and that draws itself on a canvas. * * @author Michael Kšlling and David J. Barnes * @version 2011.07.31 */ public class Circle { private int diameter; private int xPosition; private int yPosition; private String color; private boolean isVisible; /** * Create a new circle at default position with default color. */ public Circle() { diameter = 68; xPosition = 230; yPosition = 90; color = "blue"; } /** * Make this circle visible. If it was already visible, do nothing. */ public void makeVisible() { isVisible = true; draw(); } /** * Make this circle invisible. If it was already invisible, do nothing.
Subsunlo-17 is the digital platform to uplift the voices and talent either from entrepreneurship,arts,education and social change.
Comments