]> git.mxchange.org Git - addressbook-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/client/gui/AddressbookFrame.java
Added a lot stuff:
[addressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / client / gui / AddressbookFrame.java
index 1a629c03fffe1ab7d50bf5594f61a5de0f19f4be..6b0e8354d574271f71e98e946a468b07cffd2928 100644 (file)
@@ -18,6 +18,7 @@ package org.mxchange.addressbook.client.gui;
 
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
+import org.mxchange.addressbook.application.AddressbookApplication;
 import org.mxchange.addressbook.application.Application;
 import org.mxchange.addressbook.client.Client;
 import org.mxchange.addressbook.manager.contact.ManageableContact;
@@ -83,22 +84,67 @@ public class AddressbookFrame extends javax.swing.JFrame implements ClientFrame
     // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
     private void initComponents() {
 
+        statusPane = new javax.swing.JScrollPane();
+        statusText = new javax.swing.JTextPane();
+        mainMenu = new javax.swing.JMenuBar();
+        jMenu1 = new javax.swing.JMenu();
+        jMenuItem1 = new javax.swing.JMenuItem();
+        jMenu2 = new javax.swing.JMenu();
+
         setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        setTitle(AddressbookApplication.printableTitle());
+        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
+        setName("main"); // NOI18N
+
+        statusText.setBackground(new java.awt.Color(240, 240, 240));
+        java.util.ResourceBundle bundle = java.util.ResourceBundle.getBundle("org/mxchange/addressbook/client/gui/Bundle"); // NOI18N
+        statusText.setText(bundle.getString("AddressbookFrame.status.text")); // NOI18N
+        statusText.setName("status"); // NOI18N
+        statusPane.setViewportView(statusText);
+        statusText.getAccessibleContext().setAccessibleName(bundle.getString("AddressbookFrame.status.AccessibleContext.accessibleName")); // NOI18N
+
+        jMenu1.setText(bundle.getString("AddressbookFrame.text")); // NOI18N
+        jMenu1.setFocusable(false);
+        jMenu1.setName(""); // NOI18N
+
+        jMenuItem1.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_X, java.awt.event.InputEvent.ALT_MASK));
+        jMenuItem1.setText(bundle.getString("AddressbookFrame.jMenuItem1.text")); // NOI18N
+        jMenuItem1.setToolTipText(bundle.getString("AddressbookFrame.jMenuItem1.toolTipText")); // NOI18N
+        jMenuItem1.addActionListener(new java.awt.event.ActionListener() {
+            public void actionPerformed(java.awt.event.ActionEvent evt) {
+                jMenuItem1ActionPerformed(evt);
+            }
+        });
+        jMenu1.add(jMenuItem1);
+
+        mainMenu.add(jMenu1);
+
+        jMenu2.setText(bundle.getString("AddressbookFrame.jMenu2.text")); // NOI18N
+        mainMenu.add(jMenu2);
+
+        setJMenuBar(mainMenu);
 
         javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
         getContentPane().setLayout(layout);
         layout.setHorizontalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 400, Short.MAX_VALUE)
+            .addComponent(statusPane, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
         );
         layout.setVerticalGroup(
             layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 300, Short.MAX_VALUE)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addGap(0, 257, Short.MAX_VALUE)
+                .addComponent(statusPane, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
         );
 
         pack();
     }// </editor-fold>//GEN-END:initComponents
 
+    private void jMenuItem1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jMenuItem1ActionPerformed
+        // Close application instance
+       this.getClient().getApplication().doShutdown();
+    }//GEN-LAST:event_jMenuItem1ActionPerformed
+
     /**
      * Initializes the frame
      */
@@ -155,5 +201,11 @@ public class AddressbookFrame extends javax.swing.JFrame implements ClientFrame
     }
 
     // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JMenu jMenu1;
+    private javax.swing.JMenu jMenu2;
+    private javax.swing.JMenuItem jMenuItem1;
+    private javax.swing.JMenuBar mainMenu;
+    private javax.swing.JScrollPane statusPane;
+    private javax.swing.JTextPane statusText;
     // End of variables declaration//GEN-END:variables
 }