/** * Main view of the program. This'll be responsible for all the menus/buttons * and other GUI-related functionality. * * TODO: Pass in the MainModel to make communication possible between model and * view. * * @author Eric Liebowitz * @version 22jun11 */ package simple_uml.view; import javax.swing.*; import java.awt.*; import java.awt.event.*; import simple_uml.model.MainModel; import simple_uml.view.canvas.*; public class MainView extends JFrame { private static final String TITLE = "Simple UML"; private MainModel mm; public MainView (MainModel mm) { super (TITLE); this.mm = mm; this.setJMenuBar(new MenuBar()); this.add(new SumlCanvas(mm)); this.setDefaultCloseOperation(EXIT_ON_CLOSE); this.pack(); this.setSize(500, 500); } }