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 menuLawyerNotices
= new javax
.swing
.JMenu();
34 menuCreateNotice
= new javax
.swing
.JMenuItem();
35 menuSettings
= new javax
.swing
.JMenu();
36 menuDatabaseSettings
= new javax
.swing
.JMenuItem();
38 setDefaultCloseOperation(javax
.swing
.WindowConstants
.EXIT_ON_CLOSE
);
39 setTitle("Habeas - Law Office Manager");
40 setLocationByPlatform(true);
42 menuMaster
.setMnemonic('M');
43 menuMaster
.setText("Master");
45 menuClientMaster
.setText("Client Master...");
46 menuClientMaster
.addActionListener(new java
.awt
.event
.ActionListener() {
47 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
48 menuClientMasterActionPerformed(evt
);
51 menuMaster
.add(menuClientMaster
);
53 jMenuBar1
.add(menuMaster
);
55 menuLawyerNotices
.setMnemonic('L');
56 menuLawyerNotices
.setText("Lawyer Notices");
58 menuCreateNotice
.setMnemonic('C');
59 menuCreateNotice
.setText("Create New...");
60 menuCreateNotice
.addActionListener(new java
.awt
.event
.ActionListener() {
61 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
62 menuCreateNoticeActionPerformed(evt
);
65 menuLawyerNotices
.add(menuCreateNotice
);
67 jMenuBar1
.add(menuLawyerNotices
);
69 menuSettings
.setMnemonic('S');
70 menuSettings
.setText("Settings");
72 menuDatabaseSettings
.setMnemonic('D');
73 menuDatabaseSettings
.setText("Database...");
74 menuDatabaseSettings
.addActionListener(new java
.awt
.event
.ActionListener() {
75 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
76 menuDatabaseSettingsActionPerformed(evt
);
79 menuSettings
.add(menuDatabaseSettings
);
81 jMenuBar1
.add(menuSettings
);
83 setJMenuBar(jMenuBar1
);
85 javax
.swing
.GroupLayout layout
= new javax
.swing
.GroupLayout(getContentPane());
86 getContentPane().setLayout(layout
);
87 layout
.setHorizontalGroup(
88 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
89 .addGap(0, 586, Short
.MAX_VALUE
)
91 layout
.setVerticalGroup(
92 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
93 .addGap(0, 292, Short
.MAX_VALUE
)
97 }// </editor-fold>//GEN-END:initComponents
99 private void menuDatabaseSettingsActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuDatabaseSettingsActionPerformed
100 // TODO add your handling code here:
101 DatabaseSettingsDialog frm
= new DatabaseSettingsDialog (this, true);
102 frm
.setVisible(true);
103 }//GEN-LAST:event_menuDatabaseSettingsActionPerformed
105 private void menuClientMasterActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuClientMasterActionPerformed
106 // TODO add your handling code here:
107 ClientMasterDialog frm
= new ClientMasterDialog (this, true);
108 frm
.setVisible(true);
109 }//GEN-LAST:event_menuClientMasterActionPerformed
111 private void menuCreateNoticeActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuCreateNoticeActionPerformed
112 // TODO add your handling code here:
113 CreateNoticeDialog frm
= new CreateNoticeDialog(this, true);
114 frm
.setVisible(true);
115 }//GEN-LAST:event_menuCreateNoticeActionPerformed
118 * @param args the command line arguments
120 public static void main(String args
[]) {
121 /* Set the Nimbus look and feel */
122 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
123 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
124 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
127 for (javax
.swing
.UIManager
.LookAndFeelInfo info
: javax
.swing
.UIManager
.getInstalledLookAndFeels()) {
128 if ("Nimbus".equals(info
.getName())) {
129 javax
.swing
.UIManager
.setLookAndFeel(info
.getClassName());
133 } catch (ClassNotFoundException ex
) {
134 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
135 } catch (InstantiationException ex
) {
136 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
137 } catch (IllegalAccessException ex
) {
138 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
139 } catch (javax
.swing
.UnsupportedLookAndFeelException ex
) {
140 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
144 /* Create and display the form */
145 java
.awt
.EventQueue
.invokeLater(new Runnable() {
147 new MainFrame().setVisible(true);
152 // Variables declaration - do not modify//GEN-BEGIN:variables
153 private javax
.swing
.JMenuBar jMenuBar1
;
154 private javax
.swing
.JMenuItem menuClientMaster
;
155 private javax
.swing
.JMenuItem menuCreateNotice
;
156 private javax
.swing
.JMenuItem menuDatabaseSettings
;
157 private javax
.swing
.JMenu menuLawyerNotices
;
158 private javax
.swing
.JMenu menuMaster
;
159 private javax
.swing
.JMenu menuSettings
;
160 // End of variables declaration//GEN-END:variables