/** * Returns the <code>JMenu</code> displaying the appropriate menu items for * manipulating the Frame. * * @return <code>JMenu</code> displaying the appropriate menu items for * manipulating the Frame. */ private JMenu createMenu() { JMenu menu = new JMenu(""); menu.setOpaque(false); menu.setBackground(null); if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.addMenuItems(menu); } return menu; }
/** * Returns the <code>JMenu</code> displaying the appropriate menu items for * manipulating the Frame. * * @return <code>JMenu</code> displaying the appropriate menu items for * manipulating the Frame. */ private JMenu createMenu() { JMenu menu = new JMenu(""); menu.setOpaque(false); menu.setBackground(null); //if (this.getWindowDecorationStyle() == JRootPane.FRAME) { this.addMenuItems(menu); //} menu.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (e.getClickCount() > 1) { closeAction.actionPerformed(new ActionEvent(e.getSource(), ActionEvent.ACTION_PERFORMED, null, EventQueue.getMostRecentEventTime(), e.getModifiers())); } } }); return menu; }