Bonjour,
Je crée un JButton avec ce code :
Le problème, c'est qu'à l'affichage, mon bouton n'est pas carré, pourquoi ??
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 public class DataSelectorTest extends JDialog { private static int btnHeight = 40; private static int btnWidth = 40; private static int fontSize = 14; private JButton btn_addall; public DataSelectorTest() { ... btn_addall = new JButton(">>"); btn_addall.setPreferredSize(new Dimension(btnWidth, btnHeight)); btn_addall.setFont(new Font("Dialog", Font.BOLD, fontSize)); ... } }
Merci,
Nico
Partager