revision
This commit is contained in:
@@ -2,11 +2,12 @@ import java.sql.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
public class BaseDeDonnees {
|
||||
|
||||
private static final String URL = "jdbc:mariadb://dwarves.iut-fbleau.fr:3306/yolou";
|
||||
private static final String USER = "yolou";
|
||||
private static final String PASS = "serikhaneyolou";
|
||||
private static final String URL = "jdbc:mariadb://dwarves.iut-fbleau.fr/val";
|
||||
private static final String USER = "val";
|
||||
private static final String PASS = "vali";
|
||||
|
||||
/** Connexion */
|
||||
public static Connection getConnexion() throws SQLException {
|
||||
|
||||
@@ -12,7 +12,7 @@ public class CouleurList extends DefaultListCellRenderer {
|
||||
/** renvoie la couleur correspondant au nom affiché dans le menu */
|
||||
public static Color couleurDe(String nom) {
|
||||
switch (nom) {
|
||||
case "Bleu": return Color.CYAN;
|
||||
case "Bleu": return Color.CYAN; // ou Color.BLUE si tu veux un bleu plus foncé
|
||||
case "Rouge": return Color.RED;
|
||||
case "Vert": return Color.GREEN;
|
||||
case "Jaune": return Color.YELLOW;
|
||||
|
||||
@@ -11,6 +11,11 @@ public class Main extends JFrame {
|
||||
|
||||
public Main(){
|
||||
super("Papillon");
|
||||
|
||||
// Taille fixe
|
||||
setSize(350, 250);
|
||||
setResizable(false);
|
||||
setAlwaysOnTop(true);
|
||||
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
||||
|
||||
// Titre en haut
|
||||
@@ -87,9 +92,7 @@ try {
|
||||
root.add(barre, BorderLayout.SOUTH);
|
||||
setContentPane(root);
|
||||
|
||||
// Taille fixe
|
||||
setSize(350, 250);
|
||||
setResizable(false);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -93,10 +93,11 @@ public Rappel getRappel(){
|
||||
|
||||
if (estSelectionne) {
|
||||
setBackground(Color.LIGHT_GRAY);
|
||||
setBorder(BorderFactory.createLineBorder(Color.BLACK, 2));
|
||||
setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
|
||||
} else {
|
||||
setBackground(Color.CYAN);
|
||||
setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 2));
|
||||
setBackground(couleur.couleurDe(r.getTheme()));
|
||||
setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));
|
||||
|
||||
}
|
||||
|
||||
repaint();
|
||||
@@ -107,12 +108,21 @@ public Rappel getRappel(){
|
||||
public void mouseReleased(MouseEvent e) {
|
||||
if (e.isPopupTrigger()) {
|
||||
menu.show(e.getComponent(), e.getX(), e.getY());
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override public void mouseClicked(MouseEvent e) {}
|
||||
@Override public void mouseEntered(MouseEvent e) {}
|
||||
@Override public void mouseExited(MouseEvent e) {}
|
||||
@Override public void mouseEntered(MouseEvent e) {
|
||||
setBackground(Color.LIGHT_GRAY);
|
||||
setBorder(BorderFactory.createLineBorder(Color.BLACK, 1));
|
||||
}
|
||||
@Override public void mouseExited(MouseEvent e) {
|
||||
if(!estSelectionne){
|
||||
setBackground(couleur.couleurDe(r.getTheme()));
|
||||
setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY, 1));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user