/*
 * MainMenu.java
 *
 * Created on September 13, 2008, 8:40 PM
 */

package gui;

import javax.swing.ImageIcon;

/**
 *
 * @author  joe
 */
public class MainMenu extends javax.swing.JFrame {

    /** Creates new form MainMenu */
    public MainMenu() {
        this.setLocation(300, 300);
        
        //ablak ikon
        java.net.URL imgURL = MainMenu.class.getResource("/gui/images/icon.png");
        ImageIcon icon = new ImageIcon(imgURL);
        this.setIconImage(icon.getImage());
        
        
        initComponents();
        
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        logojLabel = new javax.swing.JLabel();
        MainjMenuBar1 = new javax.swing.JMenuBar();
        FilejMenu1 = new javax.swing.JMenu();
        StartjMenuItem1 = new javax.swing.JMenuItem();
        ExitjMenuItem1 = new javax.swing.JMenuItem();
        helpjMenu = new javax.swing.JMenu();
        aboutjMenuItem = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Qsim");
        setName("mainFrame"); // NOI18N
        setResizable(false);

        logojLabel.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/logo.png"))); // NOI18N

        FilejMenu1.setText("Fájl");

        StartjMenuItem1.setText("Új szimuláció");
        StartjMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                StartjMenuItemActionPerformed(evt);
            }
        });
        FilejMenu1.add(StartjMenuItem1);

        ExitjMenuItem1.setText("Kilépés");
        ExitjMenuItem1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                ExitjMenuItemActionPerformed(evt);
            }
        });
        FilejMenu1.add(ExitjMenuItem1);

        MainjMenuBar1.add(FilejMenu1);

        helpjMenu.setText("Súgó");

        aboutjMenuItem.setText("Névjegy");
        aboutjMenuItem.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                aboutjMenuItemActionPerformed(evt);
            }
        });
        helpjMenu.add(aboutjMenuItem);

        MainjMenuBar1.add(helpjMenu);

        setJMenuBar(MainjMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(logojLabel)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(logojLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 200, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

private void ExitjMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ExitjMenuItemActionPerformed
// TODO add your handling code here:
    System.exit(0);
}//GEN-LAST:event_ExitjMenuItemActionPerformed

private void StartjMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_StartjMenuItemActionPerformed

    new SimSetupDialog(this, rootPaneCheckingEnabled).setVisible(true);
}//GEN-LAST:event_StartjMenuItemActionPerformed

private void aboutjMenuItemActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_aboutjMenuItemActionPerformed
// TODO add your handling code here:
    new AboutJDialog(this, true).setVisible(true);
}//GEN-LAST:event_aboutjMenuItemActionPerformed

    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new MainMenu().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JMenuItem ExitjMenuItem1;
    private javax.swing.JMenu FilejMenu1;
    private javax.swing.JMenuBar MainjMenuBar1;
    private javax.swing.JMenuItem StartjMenuItem1;
    private javax.swing.JMenuItem aboutjMenuItem;
    private javax.swing.JMenu helpjMenu;
    private javax.swing.JLabel logojLabel;
    // End of variables declaration//GEN-END:variables

}
