Package ringdb.ui.menu

Source Code of ringdb.ui.menu.NewPealMenuItem

package ringdb.ui.menu;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JMenuItem;

import ringdb.ui.MainWindow;
import ringdb.ui.TowerScreen;

public class NewPealMenuItem extends JMenuItem implements ActionListener {

  /** Version ID */
    private static final long serialVersionUID = -3954513406715680472L;
   
    private MainWindow m_MainWindow;
   
    public NewPealMenuItem(final MainWindow pr_MainWindow) {
      super("Peal");
      addActionListener(this);
      m_MainWindow = pr_MainWindow;
    }

  @Override
    public void actionPerformed(final ActionEvent pr_Event) {
    m_MainWindow.getContentPane().removeAll();
    m_MainWindow.getContentPane().add(new TowerScreen(m_MainWindow));   
    m_MainWindow.invalidate();
    m_MainWindow.validate();
    }

}
TOP

Related Classes of ringdb.ui.menu.NewPealMenuItem

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.