Skip to content

Instantly share code, notes, and snippets.

@allisons
Created January 28, 2011 04:21
Show Gist options
  • Save allisons/799825 to your computer and use it in GitHub Desktop.
Save allisons/799825 to your computer and use it in GitHub Desktop.
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