Skip to content
Snippets Groups Projects
Commit 9baba739 authored by Eldar Kurmakaev's avatar Eldar Kurmakaev
Browse files

Changed the join method to send over a reference of the ClientUpdate Interface

parent 6788b93f
No related branches found
No related tags found
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
...@@ -101,6 +101,7 @@ public class ApplicationMain extends JPanel { ...@@ -101,6 +101,7 @@ public class ApplicationMain extends JPanel {
frame.setResizable(false); frame.setResizable(false);
frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
frame.pack(); frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true); frame.setVisible(true);
} }
} }
...@@ -11,10 +11,12 @@ ...@@ -11,10 +11,12 @@
<grid id="abaca" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="abaca" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/> <margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="100" height="70"/>
</grid>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none" title=" "/>
<children> <children>
<hspacer id="53fe0"> <hspacer id="53fe0">
<constraints> <constraints>
...@@ -23,16 +25,17 @@ ...@@ -23,16 +25,17 @@
</hspacer> </hspacer>
<component id="ebca9" class="javax.swing.JLabel"> <component id="ebca9" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<font name="Apple SD Gothic Neo" size="20"/>
<text value="Distributed Whiteboard App"/> <text value="Distributed Whiteboard App"/>
</properties> </properties>
</component> </component>
<component id="d60e2" class="javax.swing.JTextArea" binding="information"> <component id="e3c91" class="javax.swing.JTextPane" binding="information">
<constraints> <constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false"> <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="6" hsize-policy="6" anchor="0" fill="3" indent="0" use-parent-layout="false">
<preferred-size width="150" height="50"/> <preferred-size width="150" height="70"/>
</grid> </grid>
</constraints> </constraints>
<properties> <properties>
...@@ -42,33 +45,17 @@ ...@@ -42,33 +45,17 @@
</component> </component>
</children> </children>
</grid> </grid>
<grid id="790e1" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="790e1" layout-manager="GridLayoutManager" row-count="1" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/> <margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> <grid row="2" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties/> <properties/>
<border type="none"/> <border type="none"/>
<children> <children>
<component id="87b91" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Your name:"/>
</properties>
</component>
<component id="e39f4" class="javax.swing.JTextField" binding="textField1" default-binding="true">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
<component id="ea0c1" class="javax.swing.JButton" binding="joinButton"> <component id="ea0c1" class="javax.swing.JButton" binding="joinButton">
<constraints> <constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/> <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<text value="JOIN WHITEBOARD"/> <text value="JOIN WHITEBOARD"/>
...@@ -76,22 +63,20 @@ ...@@ -76,22 +63,20 @@
</component> </component>
</children> </children>
</grid> </grid>
<grid id="6ef31" layout-manager="GridLayoutManager" row-count="3" column-count="1" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1"> <grid id="6ef31" layout-manager="GridLayoutManager" row-count="2" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/> <margin top="0" left="0" bottom="0" right="0"/>
<constraints> <constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="3" indent="0" use-parent-layout="false"/> <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="3" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties/> <properties>
<border type="none"/> <name value=""/>
<requestFocusEnabled value="false"/>
</properties>
<border type="none" title=" "/>
<children> <children>
<hspacer id="23c9f">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="1" hsize-policy="6" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
</hspacer>
<component id="94078" class="javax.swing.JLabel"> <component id="94078" class="javax.swing.JLabel">
<constraints> <constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/> <grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints> </constraints>
<properties> <properties>
<text value="Server IP:"/> <text value="Server IP:"/>
...@@ -99,7 +84,7 @@ ...@@ -99,7 +84,7 @@
</component> </component>
<component id="63209" class="javax.swing.JTextField" binding="textField2"> <component id="63209" class="javax.swing.JTextField" binding="textField2">
<constraints> <constraints>
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false"> <grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/> <preferred-size width="150" height="-1"/>
</grid> </grid>
</constraints> </constraints>
...@@ -107,6 +92,27 @@ ...@@ -107,6 +92,27 @@
<text value=""/> <text value=""/>
</properties> </properties>
</component> </component>
<vspacer id="bb71b">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="87b91" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Your name:"/>
</properties>
</component>
<component id="e39f4" class="javax.swing.JTextField" binding="textField1" default-binding="true">
<constraints>
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties/>
</component>
</children> </children>
</grid> </grid>
</children> </children>
......
...@@ -9,7 +9,7 @@ import java.awt.event.ActionListener; ...@@ -9,7 +9,7 @@ import java.awt.event.ActionListener;
public class StartScreen { public class StartScreen {
private JPanel panel1; private JPanel panel1;
private JTextArea information; private JTextPane information;
private JTextField textField1; private JTextField textField1;
private JButton joinButton; private JButton joinButton;
private JTextField textField2; private JTextField textField2;
...@@ -74,6 +74,7 @@ public class StartScreen { ...@@ -74,6 +74,7 @@ public class StartScreen {
frame.setContentPane(panel1); frame.setContentPane(panel1);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.pack(); frame.pack();
frame.setLocationRelativeTo(null);
frame.setVisible(true); frame.setVisible(true);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment