瀏覽代碼

Fixes ConcurrentModifcation on StartUp, Improves random positions

Andreas T. Meyer-Berg 5 年之前
父節點
當前提交
c12928fe39

+ 1 - 1
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/Main.java

@@ -48,9 +48,9 @@ public class Main {
 	public static void main(String[] args) {
 		m = new Model();
 		c = new Controller(m);
-	    v = new MainFrame(m, c);
 	    //initializeTest();
 	    initializeMQTTTest();
+	    v = new MainFrame(m, c);
 	    /*
 	    for(int i=0; i<10; i++)
 	    	m.getSim().simulateTimeIntervall(0+50*i, 50);

+ 0 - 1
src/main/java/de/tu_darmstadt/tk/SmartHomeNetworkSim/view/MainFrame.java

@@ -94,7 +94,6 @@ public class MainFrame extends JFrame {
 		
 		this.setVisible(true);
 		//Set Dimension of the model to the JPanel size
-		control.setDimension(panel.getWidth(),panel.getHeight(),1000);	
 		panel.delayedInit();
 		
 		//Update components if window was maximized