My First Form
My First Form
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to
change this license
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this
template
*/
package com.mycompany.guiproject;
import javax.swing.JOptionPane;
/**
*
* @author Developer
*/
public class MyFirstForm extends javax.swing.JFrame {
/**
* Creates new form MyFirstForm
*/
public MyFirstForm() {
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() {
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 1174, Short.MAX_VALUE)
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 722, Short.MAX_VALUE)
);
jMenu1.setText("File");
jMenu5.setText("New");
jMenuItem9.setText("Test Case");
jMenuItem9.setAlignmentX(0.0F);
jMenuItem9.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jMenuItem9.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jMenuItem9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem9ActionPerformed(evt);
}
});
jMenu5.add(jMenuItem9);
jMenuItem10.setText(" Module");
jMenuItem10.setAlignmentX(0.0F);
jMenuItem10.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
jMenuItem10.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
jMenu5.add(jMenuItem10);
jMenu1.add(jMenu5);
jMenuItem4.setText("Open");
jMenu1.add(jMenuItem4);
jMenuItem3.setText("Save");
jMenu1.add(jMenuItem3);
jMenuItem2.setText("Exit");
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);
jMenuBar1.add(jMenu1);
jMenu2.setText("Edit");
jMenu4.setText("Extra");
jMenuItem5.setText("A");
jMenu4.add(jMenuItem5);
jMenuItem6.setText("B");
jMenu4.add(jMenuItem6);
jMenuItem7.setText("c");
jMenu4.add(jMenuItem7);
jMenu2.add(jMenu4);
jMenuBar1.add(jMenu2);
jMenu3.setText("Help");
jMenuItem8.setText("About");
jMenu3.add(jMenuItem8);
jMenuBar1.add(jMenu3);
setJMenuBar(jMenuBar1);
pack();
}// </editor-fold>//GEN-END:initComponents
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code
(optional) ">
/* If Nimbus (introduced in Java SE 6) is not available, stay with the
default look and feel.
* For details see
http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info :
javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(MyFirstForm.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(MyFirstForm.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(MyFirstForm.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(MyFirstForm.class.getName()).log(java.util.loggi
ng.Level.SEVERE, null, ex);
}
//</editor-fold>