This commit is contained in:
Simoes Lukas
2025-03-11 10:02:42 +01:00
parent 9441c8978a
commit 2a0aa37baa
47 changed files with 561 additions and 3 deletions

Binary file not shown.

View File

@@ -0,0 +1,34 @@
import java.awt.*;
import javax.swing.*;
public class Fenetre extends JFrame {
public Fenetre() {
this.setLocation(100, 100);
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setLayout(new GridLayout(14, 1));
JLabel[] chromakopia = {
new JLabel("St. Chroma"),
new JLabel("Rah Tah Tah"),
new JLabel("Noid"),
new JLabel("Darling, I"),
new JLabel("Hey Jane"),
new JLabel("I Killed You"),
new JLabel("Judge Judy"),
new JLabel("Sticky"),
new JLabel("Take Your Mask Off"),
new JLabel("Tomorrow"),
new JLabel("Thought I Was Dead"),
new JLabel("Like Him"),
new JLabel("Balloon"),
new JLabel("I Hope You Find Your Way Home")
};
for (JLabel titre : chromakopia) {
this.addMouseListener(new GestionSouris(titre));
this.add(titre);
}
this.pack();
}
}

Binary file not shown.

View File

@@ -0,0 +1,33 @@
import java.awt.event.*;
import javax.swing.*;
import java.awt.*;
public class GestionSouris implements MouseListener {
private JLabel titre;
public GestionSouris(JLabel titre) {
this.titre = titre;
}
public void mouseClicked(MouseEvent evenement) {
}
public void mouseEntered(MouseEvent evenement){
this.titre.setOpaque(true);
this.titre.setBackground(Color.CYAN);
this.titre.repaint();
}
public void mouseExited(MouseEvent evenement){
this.titre.setOpaque(true);
this.titre.setBackground(Color.WHITE);
this.titre.repaint();
}
public void mousePressed(MouseEvent evenement){
}
public void mouseReleased(MouseEvent evenement){
}
}

Binary file not shown.

View File

@@ -0,0 +1,6 @@
public class Main {
public static void main(String[] args) {
Fenetre fenetre = new Fenetre();
fenetre.setVisible(true);
}
}