From 3fec742357031a1b11f7e7fbdeb277a186ed4ef3 Mon Sep 17 00:00:00 2001 From: Amir Daouadi Date: Tue, 11 Apr 2023 23:05:42 +0200 Subject: [PATCH] ajout de la vue Lobby --- .idea/.name | 1 + Menu/MenuVue.java | 39 +++++++++++++++++++++++++++++++++++++++ Menu/background.jpg | Bin 0 -> 7504 bytes 3 files changed, 40 insertions(+) create mode 100644 .idea/.name create mode 100644 Menu/MenuVue.java create mode 100644 Menu/background.jpg diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..dfb7a6e --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +MenuPrincipal.java \ No newline at end of file diff --git a/Menu/MenuVue.java b/Menu/MenuVue.java new file mode 100644 index 0000000..4b11aeb --- /dev/null +++ b/Menu/MenuVue.java @@ -0,0 +1,39 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +public class MenuVue extends JFrame { + private JButton btnRandomGrid; + private JButton btnExistingGrid; + + public MenuVue() { + ImageIcon icon = new ImageIcon("background.jpg"); + JLabel label = new JLabel(icon); + + btnRandomGrid = new JButton("Charger une grille alĂ©atoire"); + btnExistingGrid = new JButton("Charger une grille existante"); + + JPanel buttonPanel = new JPanel(); + buttonPanel.add(btnRandomGrid); + buttonPanel.add(btnExistingGrid); + + JPanel mainPanel = new JPanel(new BorderLayout()); + mainPanel.add(label, BorderLayout.CENTER); + mainPanel.add(buttonPanel, BorderLayout.SOUTH); + + setContentPane(mainPanel); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + setTitle("Menu Principal"); + pack(); + setLocationRelativeTo(null); + setVisible(true); + } + + public void addRandomGridListener(ActionListener listener) { + btnRandomGrid.addActionListener(listener); + } + + public void addExistingGridListener(ActionListener listener) { + btnExistingGrid.addActionListener(listener); + } +} diff --git a/Menu/background.jpg b/Menu/background.jpg new file mode 100644 index 0000000000000000000000000000000000000000..aef1ce3b873f0f2e5e5692585c2dc3d32624fff1 GIT binary patch literal 7504 zcmV-W9k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