public void setMenuBar(JMenuBar menuBar) { this.menuBar = menuBar; if (frame != null) { GuiUtils.decorateFrame(frame, menuBar); } }
/** * _more_ * * @return _more_ */ private boolean windowOk() { getContents(); if (contents == null) { return false; } if (shouldMakeDialog()) { if (dialog == null) { dialog = new JDialog((Frame) null, getWindowTitle(), false); LogUtil.registerWindow(dialog); GuiUtils.packDialog(dialog, contents); dialog.setLocation(100, 100); window = dialog; } } else { if (frame == null) { frame = new JFrame(getWindowTitle()); if (menuBar != null) { GuiUtils.decorateFrame(frame, menuBar); } LogUtil.registerWindow(frame); frame.getContentPane().add(contents); frame.pack(); Msg.translateTree(frame); frame.setLocation(100, 100); window = frame; } } if (window != null) { window.addWindowListener( new WindowAdapter() { public void windowClosing(WindowEvent e) { windowIsClosing(); } }); } return window != null; }