2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
12 public class MainFrame
extends javax
.swing
.JFrame
{
15 * Creates new form MainFrame
22 * This method is called from within the constructor to initialize the form.
23 * WARNING: Do NOT modify this code. The content of this method is always
24 * regenerated by the Form Editor.
26 @SuppressWarnings("unchecked")
27 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
28 private void initComponents() {
30 jMenuBar1
= new javax
.swing
.JMenuBar();
31 menuMaster
= new javax
.swing
.JMenu();
32 menuClientMaster
= new javax
.swing
.JMenuItem();
33 menuSettings
= new javax
.swing
.JMenu();
34 menuDatabaseSettings
= new javax
.swing
.JMenuItem();
36 setDefaultCloseOperation(javax
.swing
.WindowConstants
.EXIT_ON_CLOSE
);
37 setTitle("Habeas - Law Office Manager");
38 setLocationByPlatform(true);
40 menuMaster
.setMnemonic('M');
41 menuMaster
.setText("Master");
43 menuClientMaster
.setText("Client Master...");
44 menuClientMaster
.addActionListener(new java
.awt
.event
.ActionListener() {
45 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
46 menuClientMasterActionPerformed(evt
);
49 menuMaster
.add(menuClientMaster
);
51 jMenuBar1
.add(menuMaster
);
53 menuSettings
.setMnemonic('S');
54 menuSettings
.setText("Settings");
56 menuDatabaseSettings
.setMnemonic('D');
57 menuDatabaseSettings
.setText("Database...");
58 menuDatabaseSettings
.addActionListener(new java
.awt
.event
.ActionListener() {
59 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
60 menuDatabaseSettingsActionPerformed(evt
);
63 menuSettings
.add(menuDatabaseSettings
);
65 jMenuBar1
.add(menuSettings
);
67 setJMenuBar(jMenuBar1
);
69 javax
.swing
.GroupLayout layout
= new javax
.swing
.GroupLayout(getContentPane());
70 getContentPane().setLayout(layout
);
71 layout
.setHorizontalGroup(
72 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
73 .addGap(0, 586, Short
.MAX_VALUE
)
75 layout
.setVerticalGroup(
76 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
77 .addGap(0, 292, Short
.MAX_VALUE
)
81 }// </editor-fold>//GEN-END:initComponents
83 private void menuDatabaseSettingsActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuDatabaseSettingsActionPerformed
84 // TODO add your handling code here:
85 DatabaseSettingsDialog frm
= new DatabaseSettingsDialog (this, true);
87 }//GEN-LAST:event_menuDatabaseSettingsActionPerformed
89 private void menuClientMasterActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuClientMasterActionPerformed
90 // TODO add your handling code here:
91 ClientMasterDialog frm
= new ClientMasterDialog (this, true);
93 }//GEN-LAST:event_menuClientMasterActionPerformed
96 * @param args the command line arguments
98 public static void main(String args
[]) {
99 /* Set the Nimbus look and feel */
100 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
101 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
102 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
105 for (javax
.swing
.UIManager
.LookAndFeelInfo info
: javax
.swing
.UIManager
.getInstalledLookAndFeels()) {
106 if ("Nimbus".equals(info
.getName())) {
107 javax
.swing
.UIManager
.setLookAndFeel(info
.getClassName());
111 } catch (ClassNotFoundException ex
) {
112 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
113 } catch (InstantiationException ex
) {
114 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
115 } catch (IllegalAccessException ex
) {
116 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
117 } catch (javax
.swing
.UnsupportedLookAndFeelException ex
) {
118 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
122 /* Create and display the form */
123 java
.awt
.EventQueue
.invokeLater(new Runnable() {
125 new MainFrame().setVisible(true);
130 // Variables declaration - do not modify//GEN-BEGIN:variables
131 private javax
.swing
.JMenuBar jMenuBar1
;
132 private javax
.swing
.JMenuItem menuClientMaster
;
133 private javax
.swing
.JMenuItem menuDatabaseSettings
;
134 private javax
.swing
.JMenu menuMaster
;
135 private javax
.swing
.JMenu menuSettings
;
136 // End of variables declaration//GEN-END:variables