@@ -0,0 +1,2184 @@
+/**%0A *%0A * @author Guest%0A */%0A%0Aimport javax.swing.*;%0Aimport java.awt.*;%0Aimport java.awt.event.*;%0Aimport java.io.*;%0Aimport java.net.*;%0Aimport java.util.*;%0A%0Apublic class Client %7B%0A    %0A    static String username, ip;%0A    static Socket clientSocket;%0A    static ObjectInputStream inputStream;%0A    static ObjectOutputStream outputStream;%0A    %0A    static DataPackage dataPackage;%0A    %0A    static Runnable connectToServer = new Runnable()%7B%0A        @Override%0A        public void run()%7B%0A            try%7B%0A                outputStream = new ObjectOutputStream(clientSocket.getOutputStream());%0A                dataPackage.setState(0);%0A                outputStream.writeObject(dataPackage);%0A            %7Dcatch(Exception ex)%7B%0A                JOptionPane.showMessageDialog(null, %0A                        %22Error: Could not connect to Server%22, %0A                        %22Error%22, JOptionPane.ERROR_MESSAGE);%0A            %7D%0A        %7D%0A    %7D;%0A    %0A    static Runnable updateDataPackage = new Runnable()%7B%0A        public void run()%7B%0A            while(true)%7B%0A                try%7B%0A                    %0A                %7Dcatch(Exception ex)%7B%0A                    JOptionPane.showMessageDialog(null, %0A                        %22Error: Update Thread %22, %0A                        %22Error%22, JOptionPane.ERROR_MESSAGE);%0A                %7D%0A            %7D%0A        %7D%0A    %7D;%0A    %0A    public static void main(String%5B%5D args)%7B%0A        try%7B%0A            UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());%0A        %7Dcatch(Exception ex)%7B%0A            JOptionPane.showMessageDialog(null, %22Error: (Could not set Look And Feel)%22,%0A                    %22Error%22, JOptionPane.ERROR_MESSAGE);%0A        %7D%0A        %0A        try%7B%0A            username = System.getProperty(%22user.name%22);%0A            ip = InetAddress.getLocalHost().getHostAddress();%0A            clientSocket = new Socket(ip, 27011);%0A        %7Dcatch(Exception ex)%7B%0A            JOptionPane.showMessageDialog(null, %22Error: %22, %0A                    %22Error%22, JOptionPane.ERROR_MESSAGE);%0A        %7D%0A        %0A        DataPackage dataPackage = new DataPackage(username, ip, 1);%0A        %0A    %7D%0A    %0A    public void changeName(String newName)%7B%0A        username = newName;%0A    %7D%0A    %0A%7D%0A

Create Client.java