tmp
[RRRRHHHH_Code] / ruralHouses / src / gui / StartWindow.java
index e115587..600233b 100644 (file)
@@ -3,25 +3,23 @@ package gui;
 /**
  * @author willCodeForFood
  */
-import exceptions.DB4oManagerCreationException;
-
-import javax.swing.*;
-
-import configuration.ConfigXML;
-import java.rmi.*;
 import java.awt.Color;
 import java.awt.Font;
-import java.awt.Rectangle;
-import java.awt.Dimension;
-import java.awt.BorderLayout;
-import java.awt.FlowLayout;
-import java.awt.GridLayout;
-import java.awt.GridBagLayout;
-import java.awt.GridBagConstraints;
 import java.awt.event.WindowAdapter;
 import java.awt.event.WindowEvent;
+import java.rmi.RMISecurityManager;
+
+import javax.swing.JButton;
+import javax.swing.JFrame;
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.SwingConstants;
+import javax.swing.UIManager;
+
+import configuration.ConfigXML;
 
 
+@SuppressWarnings("deprecation")
 public class StartWindow extends JFrame {
        
        private static final long serialVersionUID = 1L;
@@ -50,30 +48,8 @@ public class StartWindow extends JFrame {
                        UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
 
                        c=configuration.ConfigXML.getInstance();
-                       if (c.isBusinessLogicLocal()){
-                               //facadeInterface=new FacadeImplementation();
-                       }
-                       else {
-                               
-                               final String businessLogicNode = c.getBusinessLogicNode();
-                               // Remote service name
-                               String serviceName = "/"+c.getServiceRMI();
-                               // RMI server port number
-                               int portNumber = Integer.parseInt(c.getPortRMI());
-                               // RMI server host IP IP 
-                               /*facadeInterface = (ApplicationFacadeInterface) Naming.lookup("rmi://"
-                                       + businessLogicNode + ":" + portNumber + serviceName);*/
-                       } 
-
-               }/* catch (java.rmi.ConnectException e) {
-                       a.lblNewLabel.setText("No business logic: Run BusinessLogicServer first!!");
-                       a.lblNewLabel.setForeground(Color.RED);
-                       System.out.println("Error in StartWindow: "+e.toString());
-               } catch (java.rmi.NotBoundException e) {
-                       a.lblNewLabel.setText("No business logic: Maybe problems running BusinessLogicServer");
-                       a.lblNewLabel.setForeground(Color.RED);
-                       System.out.println("Error in StartWindow: "+e.toString());
-               } */catch (com.db4o.ext.DatabaseFileLockedException e) {
+               }catch (com.db4o.ext.DatabaseFileLockedException e) {
                        a.lblNewLabel.setText("Database locked: Do not run BusinessLogicServer or BusinessLogicServer!!");
                        a.lblNewLabel.setForeground(Color.RED);         
                        System.out.println("Error in StartWindow: "+e.toString());
@@ -82,7 +58,6 @@ public class StartWindow extends JFrame {
                        a.lblNewLabel.setForeground(Color.RED);         
                        System.out.println("Error in StartWindow: "+e.toString());
                }
-               //a.pack();
 
                
 
@@ -97,6 +72,7 @@ public class StartWindow extends JFrame {
                addWindowListener(new WindowAdapter() {
                        @Override
                        public void windowClosing(WindowEvent e) {
+
                                System.exit(1);
                        }
                });