/** * Aware-P Epanet application entry point * * @param args * @throws UnsupportedLookAndFeelException */ public static void main(String[] args) throws UnsupportedLookAndFeelException { if (Utilities.isMac()) { System.setProperty("apple.laf.useScreenMenuBar", "true"); System.setProperty("com.apple.mrj.application.apple.menu.about.name", "Aware-P Epanet"); Application app = Application.getApplication(); app.setDockIconImage( Toolkit.getDefaultToolkit().getImage(EpanetUI.class.getResource("/uiresources/ae.png"))); JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = new JMenu("File"); menuBar.add(fileMenu); openAction = new JMenuItem("Open"); saveAction = new JMenuItem("Save"); runAction = new JMenuItem("Run"); fileMenu.add(openAction); fileMenu.add(saveAction); fileMenu.add(runAction); app.setDefaultMenuBar(menuBar); } UIManager.setLookAndFeel(new Plastic3DLookAndFeel()); new EpanetUI(); }
public static void setIconImage(Image image) { application.setDockIconImage(image); }