5
public class Simple extends JFrame {
JLabel texteDuHaut, texteDuBas;
JPanel jPanelHaut;
JPanel jPanelBas;
public Simple() {
getContentPane().setLayout(new BorderLayout());
jPanelHaut = new JPanel();
jPanelHaut.setPreferredSize(new Dimension(400, 100));
jPanelHaut.setBorder(BorderFactory.createLineBorder(Color.GREEN, 3));
getContentPane().add(jPanelHaut, BorderLayout.NORTH);
jPanelBas = new JPanel();
jPanelBas.setPreferredSize(new Dimension(400, 200));
jPanelBas.setBorder(BorderFactory.createLineBorder(Color.RED, 3));
getContentPane().add(jPanelBas, BorderLayout.SOUTH);
texteDuHaut = new JLabel("l'IHM en Fi1...");
jPanelHaut.add(texteDuHaut);
texteDuBas = new JLabel("...et aprés en Fi2");
jPanelBas.add(texteDuBas);