Browse Source

Fixed things

Kenneth van Ewijk 10 năm trước cách đây
mục cha
commit
8ac67cb205

+ 0 - 16
src/client/control/Control.java

@@ -1,16 +0,0 @@
-package client.control;
-
-import client.model.Model;
-import client.view.View;
-
-public class Control {
-	
-	Model m;
-	View v;
-	
-	public Control(Model m, View v)
-	{
-		this.m = m;
-		this.v = v;
-	}
-}

+ 0 - 13
src/client/model/Model.java

@@ -1,13 +0,0 @@
-package client.model;
-
-import client.view.View;
-
-public class Model {
-	
-	View v;
-	
-	public Model(View v)
-	{
-		this.v = v;
-	}
-}

+ 0 - 1
src/client/view/Main.java

@@ -4,7 +4,6 @@ public class Main {
 
 	public static void main(String[] args) {
 		new Window();
-		//Comment
 	}
 
 }

+ 2 - 2
src/client/view/View.java → src/client/view/Panel.java

@@ -6,9 +6,9 @@ import java.awt.Graphics2D;
 
 import javax.swing.JPanel;
 
-public class View extends JPanel {
+public class Panel extends JPanel {
 
-	public View()
+	public Panel()
 	{
 		super();
 		setBackground(Color.WHITE);

+ 2 - 7
src/client/view/Window.java

@@ -2,9 +2,6 @@ package client.view;
 
 import javax.swing.JFrame;
 
-import client.control.Control;
-import client.model.Model;
-
 public class Window extends JFrame {
 	
 	public Window()
@@ -13,11 +10,9 @@ public class Window extends JFrame {
 		setDefaultCloseOperation(3);
 		setSize(400, 600);
 		
-		View v = new View();
-		Model m = new Model(v);
-		Control c = new Control(m, v);
+		Panel p = new Panel();
 		
-		setContentPane(v);
+		setContentPane(p);
 		
 		setVisible(true);
 	}

+ 0 - 5
src/clientest/Client.java

@@ -20,12 +20,10 @@ public class Client {
 							try {
 								System.out.println(input.readUTF());
 							} catch (IOException e) {
-								// TODO Auto-generated catch block
 								e.printStackTrace();
 							}
 						}
 					} catch (IOException e) {
-						// TODO Auto-generated catch block
 						e.printStackTrace();
 					}
 
@@ -38,15 +36,12 @@ public class Client {
 				try {
 					Thread.sleep(1000);
 				} catch (InterruptedException e) {
-					// TODO Auto-generated catch block
 					e.printStackTrace();
 				}
 			}
 		} catch (UnknownHostException e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 		} catch (IOException e) {
-			// TODO Auto-generated catch block
 			e.printStackTrace();
 		}