revert 6232e6f93e
revert Merge branch 'main' of https://grond.iut-fbleau.fr/stiti/SAE31_2024
This commit is contained in:
21
TestV1/TestEnAttendantResolutionBug/view/TileView.java
Normal file
21
TestV1/TestEnAttendantResolutionBug/view/TileView.java
Normal file
@@ -0,0 +1,21 @@
|
||||
package view;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
|
||||
public class TileView extends JPanel {
|
||||
private String type;
|
||||
|
||||
public TileView(String type) {
|
||||
this.type = type;
|
||||
setPreferredSize(new Dimension(50, 50)); // Taille de la tuile
|
||||
setBackground(Color.LIGHT_GRAY);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void paintComponent(Graphics g) {
|
||||
super.paintComponent(g);
|
||||
g.setColor(Color.BLACK);
|
||||
g.drawString(type, 10, 25); // Affiche le type de la tuile au centre
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user