List of usage examples for weka.gui.arffviewer ArffViewerMainPanel getMenu
public JMenuBar getMenu()
From source file:adams.gui.menu.ArffViewer.java
License:Open Source License
/** * Launches the functionality of the menu item. *///from w w w . jav a2 s . co m public void launch() { JPanel dummy = new JPanel(); ChildFrame frame = createChildFrame(dummy, GUIHelper.getDefaultDialogDimension()); ArffViewerMainPanel panel = new ArffViewerMainPanel(frame); frame.setJMenuBar(panel.getMenu()); dummy.getParent().remove(dummy); frame.getContentPane().add(panel); // load files for (int i = 0; i < m_Parameters.length; i++) panel.loadFile(new PlaceholderFile(m_Parameters[i]).getAbsolutePath()); }
From source file:meka.gui.guichooser.ArffViewerDefinition.java
License:Open Source License
/** * Called by the menu items action listener. *///from w w w . j a v a2 s . c o m @Override protected void launch() { MekaFrame frame = new MekaFrame(); ArffViewerMainPanel main = new ArffViewerMainPanel(frame); frame.setTitle(getName()); frame.setDefaultCloseOperation(MekaFrame.DISPOSE_ON_CLOSE); frame.setIconImage(GUIHelper.getLogoIcon().getImage()); frame.setLayout(new BorderLayout()); frame.add(main, BorderLayout.CENTER); frame.setJMenuBar(main.getMenu()); frame.setSize(GUIHelper.getDefaultFrameDimensions(ArffViewerMainPanel.class)); frame.setLocationRelativeTo(null); frame.setVisible(true); }