diff --git a/papillon.sql b/papillon.sql deleted file mode 100644 index 1c96354..0000000 --- a/papillon.sql +++ /dev/null @@ -1,21 +0,0 @@ --- Table principale : les rappels -CREATE TABLE rappel ( - id INT AUTO_INCREMENT PRIMARY KEY, - titre VARCHAR(50) NOT NULL, - contenu TEXT, - theme VARCHAR(30), - rang INT -); - --- Table utilisateur -CREATE TABLE utilisateur ( - id INT AUTO_INCREMENT PRIMARY KEY, - nom VARCHAR(50), - cle_unique CHAR(36) UNIQUE -); - --- Ajouter la FK côté rappel -ALTER TABLE rappel - ADD COLUMN utilisateur_id INT, - ADD CONSTRAINT fk_rappel_user FOREIGN KEY (utilisateur_id) - REFERENCES utilisateur(id) ON DELETE CASCADE; diff --git a/src/fr/iutfbleau/papillon/FenetreRappel.java b/src/fr/iutfbleau/papillon/FenetreRappel.java new file mode 100644 index 0000000..e27b88c --- /dev/null +++ b/src/fr/iutfbleau/papillon/FenetreRappel.java @@ -0,0 +1,90 @@ +import javax.swing.*; +import java.awt.*; +import java.awt.event.*; + +public class FenetreRappel extends JFrame implements ActionListener{ + + private final JButton btnFermer = new JButton("Fermer"); + private final JButton btnModifier = new JButton("Modifier"); + private final Main main; + private Rappel rappel; + + public FenetreRappel(Rappel r, Main main) { + super("Rappel : " + r.getTitre()); + ImageIcon logo = new ImageIcon("logo.png"); + setIconImage(logo.getImage()); + + this.main = main; + this.rappel = r; + + setSize(350, 250); + setLocationRelativeTo(null); + setResizable(false); + setAlwaysOnTop(true); + setLocation(main.getLocation()); + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + + JPanel panel = new JPanel(new GridBagLayout()); + panel.setBorder(BorderFactory.createEmptyBorder(15, 15, 15, 15)); + + JLabel titre = new JLabel("