test d'une vue
This commit is contained in:
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();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user