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 menuManageNotices
= new javax
.swing
.JMenuItem();
36 menuSettings
= new javax
.swing
.JMenu();
37 menuDatabaseSettings
= new javax
.swing
.JMenuItem();
39 setDefaultCloseOperation(javax
.swing
.WindowConstants
.EXIT_ON_CLOSE
);
40 setTitle("Habeas - Law Office Manager");
41 setLocationByPlatform(true);
43 menuMaster
.setMnemonic('M');
44 menuMaster
.setText("Master");
46 menuClientMaster
.setText("Client Master...");
47 menuClientMaster
.addActionListener(new java
.awt
.event
.ActionListener() {
48 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
49 menuClientMasterActionPerformed(evt
);
52 menuMaster
.add(menuClientMaster
);
54 jMenuBar1
.add(menuMaster
);
56 menuLawyerNotices
.setMnemonic('L');
57 menuLawyerNotices
.setText("Lawyer Notices");
59 menuCreateNotice
.setMnemonic('C');
60 menuCreateNotice
.setText("Create New...");
61 menuCreateNotice
.addActionListener(new java
.awt
.event
.ActionListener() {
62 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
63 menuCreateNoticeActionPerformed(evt
);
66 menuLawyerNotices
.add(menuCreateNotice
);
68 menuManageNotices
.setMnemonic('M');
69 menuManageNotices
.setText("Manage Notices...");
70 menuManageNotices
.addActionListener(new java
.awt
.event
.ActionListener() {
71 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
72 menuManageNoticesActionPerformed(evt
);
75 menuLawyerNotices
.add(menuManageNotices
);
77 jMenuBar1
.add(menuLawyerNotices
);
79 menuSettings
.setMnemonic('S');
80 menuSettings
.setText("Settings");
82 menuDatabaseSettings
.setMnemonic('D');
83 menuDatabaseSettings
.setText("Database...");
84 menuDatabaseSettings
.addActionListener(new java
.awt
.event
.ActionListener() {
85 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
86 menuDatabaseSettingsActionPerformed(evt
);
89 menuSettings
.add(menuDatabaseSettings
);
91 jMenuBar1
.add(menuSettings
);
93 setJMenuBar(jMenuBar1
);
95 javax
.swing
.GroupLayout layout
= new javax
.swing
.GroupLayout(getContentPane());
96 getContentPane().setLayout(layout
);
97 layout
.setHorizontalGroup(
98 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
99 .addGap(0, 586, Short
.MAX_VALUE
)
101 layout
.setVerticalGroup(
102 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
103 .addGap(0, 292, Short
.MAX_VALUE
)
107 }// </editor-fold>//GEN-END:initComponents
109 private void menuDatabaseSettingsActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuDatabaseSettingsActionPerformed
110 // TODO add your handling code here:
111 DatabaseSettingsDialog frm
= new DatabaseSettingsDialog (this, true);
112 frm
.setVisible(true);
113 }//GEN-LAST:event_menuDatabaseSettingsActionPerformed
115 private void menuClientMasterActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuClientMasterActionPerformed
116 // TODO add your handling code here:
117 ClientMasterDialog frm
= new ClientMasterDialog (this, true);
118 frm
.setVisible(true);
119 }//GEN-LAST:event_menuClientMasterActionPerformed
121 private void menuCreateNoticeActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuCreateNoticeActionPerformed
122 // TODO add your handling code here:
123 CreateNoticeDialog frm
= new CreateNoticeDialog(this, true);
124 frm
.setVisible(true);
125 }//GEN-LAST:event_menuCreateNoticeActionPerformed
127 private void menuManageNoticesActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuManageNoticesActionPerformed
128 // TODO add your handling code here:
129 ManageNoticesDialog frm
= new ManageNoticesDialog(this, true);
130 frm
.setVisible(true);
131 }//GEN-LAST:event_menuManageNoticesActionPerformed
134 * @param args the command line arguments
136 public static void main(String args
[]) {
137 /* Set the Nimbus look and feel */
138 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
139 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
140 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
143 for (javax
.swing
.UIManager
.LookAndFeelInfo info
: javax
.swing
.UIManager
.getInstalledLookAndFeels()) {
144 if ("Nimbus".equals(info
.getName())) {
145 javax
.swing
.UIManager
.setLookAndFeel(info
.getClassName());
149 } catch (ClassNotFoundException ex
) {
150 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
151 } catch (InstantiationException ex
) {
152 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
153 } catch (IllegalAccessException ex
) {
154 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
155 } catch (javax
.swing
.UnsupportedLookAndFeelException ex
) {
156 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
160 /* Create and display the form */
161 java
.awt
.EventQueue
.invokeLater(new Runnable() {
163 new MainFrame().setVisible(true);
168 // Variables declaration - do not modify//GEN-BEGIN:variables
169 private javax
.swing
.JMenuBar jMenuBar1
;
170 private javax
.swing
.JMenuItem menuClientMaster
;
171 private javax
.swing
.JMenuItem menuCreateNotice
;
172 private javax
.swing
.JMenuItem menuDatabaseSettings
;
173 private javax
.swing
.JMenu menuLawyerNotices
;
174 private javax
.swing
.JMenuItem menuManageNotices
;
175 private javax
.swing
.JMenu menuMaster
;
176 private javax
.swing
.JMenu menuSettings
;
177 // End of variables declaration//GEN-END:variables