merge avec le github + j'ai mis les trucs de l'interface dans un package gui

This commit is contained in:
MathieuPietri
2019-10-11 17:59:39 +02:00
parent aa0b3a6bb4
commit e0280d7e18
17 changed files with 362 additions and 0 deletions

25
src/gui/FloorPanels.java Normal file
View File

@ -0,0 +1,25 @@
package gui;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class FloorPanels extends JPanel {
private int nbFloors;
private JPanel[] floors;
public FloorPanels(int nbFloors) {
this.nbFloors = nbFloors;
floors = new JPanel[nbFloors];
this.setLayout(new BoxLayout(this, BoxLayout.PAGE_AXIS));
this.add(new JLabel("Call."));
for (int i = 0; i < nbFloors; i++) {
floors[i] = new JPanel();
floors[i].setLayout(new BoxLayout(floors[i], BoxLayout.LINE_AXIS));
floors[i].add(new JLabel("" + (i + 1)));
floors[i].add(new JButton(""));
floors[i].add(new JButton(""));
this.add(floors[i]);
}
}
}