Package javax.swing

Examples of javax.swing.JMenu.insertSeparator()


      final JMenuItem exit = new JMenuItem( "Exit", 'Q');
      exit.setAccelerator(KeyStroke.getKeyStroke('Q',
            Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
      fileMenu.add(exit);

      fileMenu.insertSeparator(2);
     
     
      ActionListener menuListener = new ActionListener()
      {
        public void actionPerformed(ActionEvent event)
View Full Code Here


          {
            JMenuItem serviceItem = new JMenuItem(title);
            serviceItem.addActionListener(new MenuItemListener(item));

            childMenu.insert(serviceItem, 0);
            childMenu.insertSeparator(1);

            menu.add(childMenu);
          }
        }
      }
View Full Code Here

    mSaveAs = new JMenuItem("Save As..");
    mSaveAs.addActionListener(this);
    mSaveAs.setIcon(iSaveAs);
   
    JMenu fm = ref.getMenu(0);
    fm.insertSeparator(0);
    fm.add(mSaveAs, 0);
    fm.add(mSave, 0);
    fm.insertSeparator(0);
    fm.insert(mClose, 0);
    fm.add(mOpen, 0);
View Full Code Here

   
    JMenu fm = ref.getMenu(0);
    fm.insertSeparator(0);
    fm.add(mSaveAs, 0);
    fm.add(mSave, 0);
    fm.insertSeparator(0);
    fm.insert(mClose, 0);
    fm.add(mOpen, 0);
    fm.insertSeparator(0);
    fm.add(mNew, 0);
  }
View Full Code Here

    fm.add(mSaveAs, 0);
    fm.add(mSave, 0);
    fm.insertSeparator(0);
    fm.insert(mClose, 0);
    fm.add(mOpen, 0);
    fm.insertSeparator(0);
    fm.add(mNew, 0);
  }

  
  public void setPluginPool(Vector<Plugin> ref) {
View Full Code Here

      final JMenuItem exit = new JMenuItem( "Exit", 'Q');
      exit.setAccelerator(KeyStroke.getKeyStroke('Q',
            Toolkit.getDefaultToolkit().getMenuShortcutKeyMask(), false));
      fileMenu.add(exit);

      fileMenu.insertSeparator(2);
     
     
      ActionListener menuListener = new ActionListener()
      {
        public void actionPerformed(ActionEvent event)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.