Transférer les fichiers vers 'src/Test'
This commit is contained in:
@@ -5,7 +5,12 @@ import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
|
||||
public class MainMenu extends JFrame {
|
||||
private final static Dimension MINIMUM_SIZE = new Dimension(960, 540);
|
||||
private CardLayout cards = new CardLayout();
|
||||
private AdminView av;
|
||||
private ProfView pv;
|
||||
|
||||
|
||||
private JButton[] buttonTab = {
|
||||
new JButton("Admin"),
|
||||
new JButton("Prof"),
|
||||
@@ -17,11 +22,23 @@ public class MainMenu extends JFrame {
|
||||
super();
|
||||
this.setDefaultCloseOperation(EXIT_ON_CLOSE);
|
||||
this.setExtendedState(MAXIMIZED_BOTH);
|
||||
//this.setUndecorated(true);
|
||||
this.setMinimumSize(MINIMUM_SIZE);
|
||||
init();
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
BDatabase db = new BDatabase();
|
||||
Controller listener = new Controller(db);
|
||||
av = new AdminView(listener.getEtudiants(), listener.getGroupes(), listener);
|
||||
pv = new ProfView(listener.getEtudiants(), listener.getGroupes(), listener);
|
||||
|
||||
this.setLayout(cards);
|
||||
this.add(first());
|
||||
this.add(adminView());
|
||||
this.add(profView());
|
||||
cards.first(this.getContentPane());
|
||||
this.setVisible(true);
|
||||
}
|
||||
|
||||
|
||||
@@ -51,11 +68,21 @@ public class MainMenu extends JFrame {
|
||||
}
|
||||
|
||||
|
||||
private JPanel adminView() {
|
||||
JPanel mainPanel = new JPanel
|
||||
}
|
||||
|
||||
|
||||
private JPanel profView() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void action(ActionEvent e) {
|
||||
JButton origin = (JButton) e.getSource();
|
||||
System.out.println(origin.getText());
|
||||
|
||||
BDatabase db = new BDatabase();
|
||||
Controller listener = new Controller(db);
|
||||
|
||||
|
||||
if (origin.getText() == "Admin") {
|
||||
listener.createAdminView();
|
||||
|
Reference in New Issue
Block a user