package FakeMenu;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
import javax.swing.JMenuBar;
import javax.swing.JMenu;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import javax.swing.JMenuItem;
import javax.swing.JOptionPane;
public class FakeMenu extends JFrame {
/**
*
*/
private static final long serialVersionUID = 1L;
private JPanel contentPane;
JTextField t;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
FakeMenu frame = new FakeMenu();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public FakeMenu() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 308);
JMenuBar menuBar = new JMenuBar();
setJMenuBar(menuBar);
JMenu mnFile = new JMenu("File");
menuBar.add(mnFile);
JMenu mnNewMenu_1 = new JMenu("New");
mnNewMenu_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
JOptionPane.showMessageDialog(null, "ada");
}
});
mnFile.add(mnNewMenu_1);
JMenu mnNewMenu_2 = new JMenu("Open");
mnFile.add(mnNewMenu_2);
JMenu mnSave_1 = new JMenu("Save");
mnFile.add(mnSave_1);
JMenu mnNewMenu = new JMenu("Edit");
menuBar.add(mnNewMenu);
JMenu mnCopy = new JMenu("Copy");
mnNewMenu.add(mnCopy);
JMenu mnCut = new JMenu("Cut");
mnNewMenu.add(mnCut);
JMenu mnNewMenu_3 = new JMenu("Paste");
mnNewMenu.add(mnNewMenu_3);
JMenu mnSave = new JMenu("Help");
menuBar.add(mnSave);
JMenu mnAbout = new JMenu("About");
mnSave.add(mnAbout);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
contentPane.setLayout(new BorderLayout(0, 0));
setContentPane(contentPane);
}
}