package pulververwaltung4;
/**
*
* @author userfritz
* @version
*/
import java.awt.*;
import java.sql.*;
import javax.swing.*;
public class Application extends javax.swing.JFrame {
/** Creates new form Application */
public Application() {
initComponents ();
pack ();
}
/** 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 FormEditor.
*/
private void initComponents() {
menuBar = new javax.swing.JMenuBar();
fileMenu = new javax.swing.JMenu();
nPulver = new javax.swing.JMenuItem();
sPulver = new javax.swing.JMenuItem();
exitMenuItem = new javax.swing.JMenuItem();
helpMenu = new javax.swing.JMenu();
contentsMenuItem = new javax.swing.JMenuItem();
aboutMenuItem = new javax.swing.JMenuItem();
fileMenu.setText("File");
nPulver.setText("Neues Pulver erfassen");
nPulver.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
nPulverActionPerformed(evt);
}
}
);
fileMenu.add(nPulver);
sPulver.setText("Pulver suchen");
fileMenu.add(sPulver);
exitMenuItem.setText("Exit");
exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
exitMenuItemActionPerformed(evt);
}
}
);
fileMenu.add(exitMenuItem);
menuBar.add(fileMenu);
helpMenu.setText("Help");
contentsMenuItem.setText("Contents");
helpMenu.add(contentsMenuItem);
aboutMenuItem.setText("About");
helpMenu.add(aboutMenuItem);
menuBar.add(helpMenu);
getContentPane().setLayout(null);
addWindowListener(new java.awt.event.WindowAdapter() {
public void windowClosing(java.awt.event.WindowEvent evt) {
exitForm(evt);
}
}
);
setJMenuBar(menuBar);
}
private void nPulverActionPerformed(java.awt.event.ActionEvent evt) {
// Add your handling code here:
JPanel neuesPulver = new JPanel();
setContentPane(neuesPulver);
}
private void exitMenuItemActionPerformed (java.awt.event.ActionEvent evt) {
System.exit (0);
}
/** Exit the Application */
private void exitForm(java.awt.event.WindowEvent evt) {
System.exit (0);
}
/**
* @param args the command line arguments
*/
public static void main (String args[]) {
new Application ().show ();
}
// Variables declaration - do not modify
private javax.swing.JMenuBar menuBar;
private javax.swing.JMenu fileMenu;
private javax.swing.JMenuItem nPulver;
private javax.swing.JMenuItem sPulver;
private javax.swing.JMenuItem exitMenuItem;
private javax.swing.JMenu helpMenu;
private javax.swing.JMenuItem contentsMenuItem;
private javax.swing.JMenuItem aboutMenuItem;
// End of variables declaration
}
public static void main (String args[]) {
Application application = new Application();
application.setSize(400,400);
application.setVisible(true);
}