aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/ui/MainFrame.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/ui/MainFrame.java')
-rw-r--r--src/main/java/ui/MainFrame.java35
1 files changed, 24 insertions, 11 deletions
diff --git a/src/main/java/ui/MainFrame.java b/src/main/java/ui/MainFrame.java
index 53e0a3f..0eac906 100644
--- a/src/main/java/ui/MainFrame.java
+++ b/src/main/java/ui/MainFrame.java
@@ -13,33 +13,46 @@ import javax.swing.JTextArea;
import java.awt.Font;
import java.awt.BorderLayout;
-public class MainFrame extends JFrame {
+public class MainFrame extends JFrame implements Runnable {
/**
* Launch the application.
*/
public static void main(String[] args) {
- EventQueue.invokeLater(new Runnable() {
- public void run() {
- try {
+
MainFrame frame = new MainFrame();
frame.setVisible(true);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- });
}
/**
* Create the frame.
*/
+ public LoginPanel loginPanel=null;
+ public ChooseOpponentPanel chooseOpponentPanel=null;
+ GamePanel gamePanel=null;
public MainFrame() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 727, 429);
+ loginPanel=new LoginPanel();
+ chooseOpponentPanel=new ChooseOpponentPanel();
+ gamePanel=new GamePanel();
getContentPane().setLayout(new BorderLayout(0, 0));
+ add(loginPanel,BorderLayout.CENTER);
+ setVisible(true);
+ new Thread(this).start();
}
- public void testOut() {
- System.out.println("RADI");
+ @Override
+ public void run() {
+ while(true) {
+ try {
+ Thread.sleep(500);
+ System.out.println("testClient");
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ }
+
}
+
}