public void setPanHaut() { // JPanel panHaut = new JPanel(); panHaut.setLayout(new BorderLayout()); String color1 = "black"; String color2 = "grey"; panHaut.add( new JLabel( "<html><p style=\"margin-left: 380x;\"><br/>Vous faites l'exercice : " + e.getTitle() + "</p></html>"), BorderLayout.NORTH); panHaut.add( new JLabel( "<html><p style=\"font-size: 16px;margin-left: 50x; color: " + color2 + ";\"><br/>Énoncé : " + e.getWordingText() + "</p></html>"), BorderLayout.CENTER); }