Mise à jour de 'src/Test/MainMenu.java'

This commit is contained in:
Romain BESSON 2022-12-02 09:16:02 +01:00
parent 90b2709927
commit f44d748a43

View File

@ -204,14 +204,14 @@ public class MainMenu extends JFrame {
JButton origin = (JButton) e.getSource(); JButton origin = (JButton) e.getSource();
createJMenuBar(); createJMenuBar();
if (origin.getText().equals("Admin")) { if (origin.getText().equals(viewName[0])) {
this.setTitle(viewName[0]); this.setTitle(viewName[0]);
menuBar.setBackground(Color.RED); menuBar.setBackground(Color.RED);
adminPanel.setLayout(adminCards); adminPanel.setLayout(adminCards);
adminPanel.add(cardWithTable(adminView())); adminPanel.add(cardWithTable(adminView()));
cardIndex = 1; cardIndex = 1;
} else if (origin.getText().equals("Prof")) { } else if (origin.getText().equals(viewName[1])) {
this.setTitle(viewName[1]); this.setTitle(viewName[1]);
menuBar.setBackground(Color.MAGENTA); menuBar.setBackground(Color.MAGENTA);
profPanel.setLayout(profCards); profPanel.setLayout(profCards);