Initial Commit
[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 menuSettings = new javax.swing.JMenu();
34 menuDatabaseSettings = new javax.swing.JMenuItem();
35
36 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
37 setTitle("Habeas - Law Office Manager");
38 setLocationByPlatform(true);
39
40 menuMaster.setMnemonic('M');
41 menuMaster.setText("Master");
42
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);
47 }
48 });
49 menuMaster.add(menuClientMaster);
50
51 jMenuBar1.add(menuMaster);
52
53 menuSettings.setMnemonic('S');
54 menuSettings.setText("Settings");
55
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);
61 }
62 });
63 menuSettings.add(menuDatabaseSettings);
64
65 jMenuBar1.add(menuSettings);
66
67 setJMenuBar(jMenuBar1);
68
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)
74 );
75 layout.setVerticalGroup(
76 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
77 .addGap(0, 292, Short.MAX_VALUE)
78 );
79
80 pack();
81 }// </editor-fold>//GEN-END:initComponents
82
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);
86 frm.setVisible(true);
87 }//GEN-LAST:event_menuDatabaseSettingsActionPerformed
88
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);
92 frm.setVisible(true);
93 }//GEN-LAST:event_menuClientMasterActionPerformed
94
95 /**
96 * @param args the command line arguments
97 */
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
103 */
104 try {
105 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
106 if ("Nimbus".equals(info.getName())) {
107 javax.swing.UIManager.setLookAndFeel(info.getClassName());
108 break;
109 }
110 }
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);
119 }
120 //</editor-fold>
121
122 /* Create and display the form */
123 java.awt.EventQueue.invokeLater(new Runnable() {
124 public void run() {
125 new MainFrame().setVisible(true);
126 }
127 });
128 }
129
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
137 }