Merge remote-tracking branch 'origin/lucasjoshua' into lucasjoshua
This commit is contained in:
commit
f1adf06035
|
@ -48,13 +48,14 @@ public class MainFrame extends JFrame {
|
|||
startMultiplayerGame multiplayerGame = new startMultiplayerGame(this);
|
||||
coinToss coinToss = new coinToss(this);
|
||||
Verbinden verbinden = new Verbinden(this);
|
||||
|
||||
WinLooseScreen winLooseScreen = new WinLooseScreen(this,true);
|
||||
// Panels hinzufügen
|
||||
mainPanel.add(mainMenuView, "MainMenu");
|
||||
mainPanel.add(localGame, "LocalGame");
|
||||
mainPanel.add(multiplayerGame, "MultiplayerGame");
|
||||
mainPanel.add(coinToss, "coinToss");
|
||||
mainPanel.add(verbinden, "Verbinden");
|
||||
mainPanel.add(winLooseScreen, "WinLooseScreen");
|
||||
|
||||
// Hauptpanel in JFrame hinzufügen
|
||||
add(mainPanel);
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
import java.awt.*;
|
||||
import javax.swing.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
import java.net.InetSocketAddress;
|
||||
|
||||
public class WinLooseScreen extends JPanel {
|
||||
JLabel winLabel = new JLabel("Du hast Gewonnen!");
|
||||
JLabel looseLabel = new JLabel("Du hast Verloren!");
|
||||
|
||||
Font robotoFont = new Font("Roboto", Font.BOLD, 45);
|
||||
|
||||
public WinLooseScreen(MainFrame frame,boolean wl) {
|
||||
setLayout(null);
|
||||
buildPanel(frame,wl);
|
||||
}
|
||||
|
||||
public void buildPanel(MainFrame frame,boolean wl) {
|
||||
if (wl) {
|
||||
add(winLabel);
|
||||
}else{
|
||||
add(looseLabel);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue