1 Commits

Author SHA1 Message Date
Val Jenson 08ce0e73d8 test d'une vue 2025-10-16 10:14:15 +02:00
2 changed files with 21 additions and 6 deletions
Binary file not shown.
@@ -1,16 +1,31 @@
package fr.iutfbleau.papillon.vue; /*package fr.iutfbleau.papillon.vue;*/
import javax.swing.*; import javax.swing.*;
import java.awt.*; import java.awt.*;
public class VuePrincipale extends JFrame { public class VuePrincipale extends JFrame {
// composants publics “contrôlés” par le contrôleur // composants publics “contrôlés” par le contrôleur
public final JTextField champTitre = new JTextField(20); public static JTextField champTitre = new JTextField(20);
public final JTextArea champContenu = new JTextArea(4, 20); public static JTextArea champContenu = new JTextArea(4, 20);
public final JTextArea zoneAffiche = new JTextArea(12, 26); public static JTextArea zoneAffiche = new JTextArea(12, 26);
public final JButton boutonAjouter = new JButton("Ajouter"); public static JButton boutonAjouter = new JButton("Ajouter");
public final JButton boutonLister = new JButton("Lister"); public static JButton boutonLister = new JButton("Lister");
public VuePrincipale() { public VuePrincipale() {
super("Rappel");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setSize(300, 300);
setLayout(new GridLayout(5, 1));
add(champTitre);
add(champContenu);
add(zoneAffiche);
add(boutonAjouter);
add(boutonLister);
setVisible(true);
}
public static void main(String[] args) {
new VuePrincipale();
} }
} }