|
|
@@ -0,0 +1,27 @@
|
|
|
+package formation.java.gui.panel;
|
|
|
+
|
|
|
+import java.awt.Container;
|
|
|
+
|
|
|
+import javax.swing.JButton;
|
|
|
+import javax.swing.JFrame;
|
|
|
+import javax.swing.JPanel;
|
|
|
+
|
|
|
+public class DemonstrationFenetre {
|
|
|
+ public static void main(String[] args) {
|
|
|
+ JFrame fenetre = new JFrame("Démonstration Panel");
|
|
|
+ fenetre.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
|
|
|
+ fenetre.setBounds(50, 100, 500, 400);
|
|
|
+
|
|
|
+ Container panneauPrincipal = fenetre.getContentPane();
|
|
|
+
|
|
|
+ JButton monBouton = new JButton("Essai bouton");
|
|
|
+ JPanel panel = new JPanel();
|
|
|
+
|
|
|
+ panneauPrincipal.add(panel);
|
|
|
+ panel.add(monBouton);
|
|
|
+
|
|
|
+
|
|
|
+ fenetre.setVisible(true);
|
|
|
+
|
|
|
+ }
|
|
|
+}
|