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
.setMnemonic('c');
47 menuClientMaster
.setText("Client Master...");
48 menuClientMaster
.addActionListener(new java
.awt
.event
.ActionListener() {
49 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
50 menuClientMasterActionPerformed(evt
);
53 menuMaster
.add(menuClientMaster
);
55 jMenuBar1
.add(menuMaster
);
57 menuLawyerNotices
.setMnemonic('L');
58 menuLawyerNotices
.setText("Lawyer Notices");
60 menuCreateNotice
.setMnemonic('C');
61 menuCreateNotice
.setText("Create New...");
62 menuCreateNotice
.addActionListener(new java
.awt
.event
.ActionListener() {
63 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
64 menuCreateNoticeActionPerformed(evt
);
67 menuLawyerNotices
.add(menuCreateNotice
);
69 menuManageNotices
.setMnemonic('M');
70 menuManageNotices
.setText("Manage Notices...");
71 menuManageNotices
.addActionListener(new java
.awt
.event
.ActionListener() {
72 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
73 menuManageNoticesActionPerformed(evt
);
76 menuLawyerNotices
.add(menuManageNotices
);
78 jMenuBar1
.add(menuLawyerNotices
);
80 menuSettings
.setMnemonic('S');
81 menuSettings
.setText("Settings");
83 menuDatabaseSettings
.setMnemonic('D');
84 menuDatabaseSettings
.setText("Database...");
85 menuDatabaseSettings
.addActionListener(new java
.awt
.event
.ActionListener() {
86 public void actionPerformed(java
.awt
.event
.ActionEvent evt
) {
87 menuDatabaseSettingsActionPerformed(evt
);
90 menuSettings
.add(menuDatabaseSettings
);
92 jMenuBar1
.add(menuSettings
);
94 setJMenuBar(jMenuBar1
);
96 javax
.swing
.GroupLayout layout
= new javax
.swing
.GroupLayout(getContentPane());
97 getContentPane().setLayout(layout
);
98 layout
.setHorizontalGroup(
99 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
100 .addGap(0, 586, Short
.MAX_VALUE
)
102 layout
.setVerticalGroup(
103 layout
.createParallelGroup(javax
.swing
.GroupLayout
.Alignment
.LEADING
)
104 .addGap(0, 292, Short
.MAX_VALUE
)
108 }// </editor-fold>//GEN-END:initComponents
110 private void menuDatabaseSettingsActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuDatabaseSettingsActionPerformed
111 // TODO add your handling code here:
112 DatabaseSettingsDialog frm
= new DatabaseSettingsDialog (this, true);
113 frm
.setVisible(true);
114 }//GEN-LAST:event_menuDatabaseSettingsActionPerformed
116 private void menuClientMasterActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuClientMasterActionPerformed
117 // TODO add your handling code here:
118 ClientMasterDialog frm
= new ClientMasterDialog (this, true);
119 frm
.setVisible(true);
120 }//GEN-LAST:event_menuClientMasterActionPerformed
122 private void menuCreateNoticeActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuCreateNoticeActionPerformed
123 // TODO add your handling code here:
124 CreateNoticeDialog frm
= new CreateNoticeDialog(this, true);
125 frm
.setVisible(true);
126 }//GEN-LAST:event_menuCreateNoticeActionPerformed
128 private void menuManageNoticesActionPerformed(java
.awt
.event
.ActionEvent evt
) {//GEN-FIRST:event_menuManageNoticesActionPerformed
129 // TODO add your handling code here:
130 ManageNoticesDialog frm
= new ManageNoticesDialog(this, true);
131 frm
.setVisible(true);
132 }//GEN-LAST:event_menuManageNoticesActionPerformed
135 * @param args the command line arguments
137 public static void main(String args
[]) {
138 /* Set the Nimbus look and feel */
139 //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
140 /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
141 * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
144 for (javax
.swing
.UIManager
.LookAndFeelInfo info
: javax
.swing
.UIManager
.getInstalledLookAndFeels()) {
145 if ("Nimbus".equals(info
.getName())) {
146 javax
.swing
.UIManager
.setLookAndFeel(info
.getClassName());
150 } catch (ClassNotFoundException ex
) {
151 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
152 } catch (InstantiationException ex
) {
153 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
154 } catch (IllegalAccessException ex
) {
155 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
156 } catch (javax
.swing
.UnsupportedLookAndFeelException ex
) {
157 java
.util
.logging
.Logger
.getLogger(MainFrame
.class.getName()).log(java
.util
.logging
.Level
.SEVERE
, null, ex
);
161 /* Create and display the form */
162 java
.awt
.EventQueue
.invokeLater(new Runnable() {
164 new MainFrame().setVisible(true);
169 // Variables declaration - do not modify//GEN-BEGIN:variables
170 private javax
.swing
.JMenuBar jMenuBar1
;
171 private javax
.swing
.JMenuItem menuClientMaster
;
172 private javax
.swing
.JMenuItem menuCreateNotice
;
173 private javax
.swing
.JMenuItem menuDatabaseSettings
;
174 private javax
.swing
.JMenu menuLawyerNotices
;
175 private javax
.swing
.JMenuItem menuManageNotices
;
176 private javax
.swing
.JMenu menuMaster
;
177 private javax
.swing
.JMenu menuSettings
;
178 // End of variables declaration//GEN-END:variables