c40672c45f7388cbbf64c7915c0bb8d375318d77
[habeas.git] / src / habeas / MainFrame.java
1 /*
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.
5 */
6 package habeas;
7
8 /**
9 *
10 * @author hari
11 */
12 public class MainFrame extends javax.swing.JFrame {
13
14 /**
15 * Creates new form MainFrame
16 */
17 public MainFrame() {
18 initComponents();
19 }
20
21 /**
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.
25 */
26 @SuppressWarnings("unchecked")
27 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
28 private void initComponents() {
29
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();
37
38 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
39 setTitle("Habeas - Law Office Manager");
40 setLocationByPlatform(true);
41
42 menuMaster.setMnemonic('M');
43 menuMaster.setText("Master");
44
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);
49 }
50 });
51 menuMaster.add(menuClientMaster);
52
53 jMenuBar1.add(menuMaster);
54
55 menuLawyerNotices.setMnemonic('L');
56 menuLawyerNotices.setText("Lawyer Notices");
57
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);
63 }
64 });
65 menuLawyerNotices.add(menuCreateNotice);
66
67 jMenuBar1.add(menuLawyerNotices);
68
69 menuSettings.setMnemonic('S');
70 menuSettings.setText("Settings");
71
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);
77 }
78 });
79 menuSettings.add(menuDatabaseSettings);
80
81 jMenuBar1.add(menuSettings);
82
83 setJMenuBar(jMenuBar1);
84
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)
90 );
91 layout.setVerticalGroup(
92 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
93 .addGap(0, 292, Short.MAX_VALUE)
94 );
95
96 pack();
97 }// </editor-fold>//GEN-END:initComponents
98
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
104
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
110
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
116
117 /**
118 * @param args the command line arguments
119 */
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
125 */
126 try {
127 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
128 if ("Nimbus".equals(info.getName())) {
129 javax.swing.UIManager.setLookAndFeel(info.getClassName());
130 break;
131 }
132 }
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);
141 }
142 //</editor-fold>
143
144 /* Create and display the form */
145 java.awt.EventQueue.invokeLater(new Runnable() {
146 public void run() {
147 new MainFrame().setVisible(true);
148 }
149 });
150 }
151
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
161 }