Bonjour, j'aimerais appliquer le look and feel metal à mon application et ca ne marche pas.
Voilà le code :
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
18
19
20
21
22
23
24
25
26
27
28
29
30 import javax.swing.JFrame; import javax.swing.UIManager; import javax.swing.plaf.metal.MetalLookAndFeel; public class Main { private static MainFrame frame ; public static void main(String[] args) { frame = new MainFrame(); try { UIManager.setLookAndFeel(new MetalLookAndFeel()); } catch(Exception e) { } frame.setVisible(true); } } class MainFrame extends JFrame { public MainFrame() { super("sd"); setSize(300,300); } }
Si je rajoute des composant, ceux-ci on bien le look mais j'aimerais que la barre du haut l'ai aussi. comment faire ?
merci
Partager