| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 
 |  
import java.awt.BorderLayout;
import javax.swing.*;
import javax.swing.border.TitledBorder;
 
public class Main {
    private JFrame cadre;
    private JPanel pane,pane_authentif;
    private JButton bouton_connexion;
 
    public Main()
    {
        cadre = new JFrame(" test ");
        cadre.setSize(600,400);
 
        pane = new JPanel (new BorderLayout());
        pane_authentif = new JPanel ();
        pane_authentif.setBorder(new TitledBorder("Authentification"));
        pane_authentif.setSize(200, 200);
        pane_authentif.setLocation(200, 200);
 
        bouton_connexion  =new JButton("Entrer");
        bouton_connexion .setSelected(true);
 
        pane_authentif.add(bouton_connexion);
        pane.add(pane_authentif,BorderLayout.CENTER);
 
        cadre.getContentPane().add(pane);
        cadre.setVisible(true);
    }
    public static void main(String[] args) {
            Main T=new Main();
    }
} | 
Partager