Created
January 28, 2011 04:21
-
-
Save allisons/799825 to your computer and use it in GitHub Desktop.
This file contains 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
public static void main(String[] args) { | |
JFrame f = new JFrame("Graphics Editor"); | |
f.setDefaultCloseOperation( WindowConstants.EXIT_ON_CLOSE ); | |
f.setSize(400,400); | |
Container content = f.getContentPane(); | |
f.setVisible(true); | |
DrawingBoard mainDB = new DrawingBoard(); | |
ConsoleView csv = new ConsoleView(mainDB); | |
GraphicView gphv = new GraphicView(mainDB); | |
Circle circle1 = new Circle(new Point(200,200), 150); | |
Circle circle2 = new Circle(new Point(100,300), 100); | |
RightTriangle triangle1 = new RightTriangle(new Point(300, 300), 100); | |
mainDB.addShape(circle1); | |
mainDB.addShape(circle2); | |
mainDB.addShape(triangle1); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment