Bonjour,
J'utilise un code Look&Feel qui permet de changer de thèmes dans la JFrame,
j'aimerais appliquer ce changement sur les images des JButton, je ne sais pas comment faire...

Le code d'actualisation du thème tient dans ceci:
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
 
    public void updateLookAndFeel() {
        try {
            UIManager.setLookAndFeel(currentLookAndFeel);
            this.update();
            this.updateUI();
        } catch (Exception ex) {
            System.out.println("Failed loading L&F: " + currentLookAndFeel);
            System.out.println(ex);
 
        }
    }
 
    private void update() {
 
        JFrame frame = getFrame();
        if (frame == null) {
            SwingUtilities.updateComponentTreeUI(this);
        } else {
            SwingUtilities.updateComponentTreeUI(frame);
        }
    }
 
    public JFrame getFrame() { 
        return frame;
    }
 
 
    public void itemStateChanged(ItemEvent e) {
        if (e.getSource() == Jmetal) {
            setLookAndFeel(metal);
        } else if (e.getSource() == Jwindows) {
            setLookAndFeel(windows);
        } else if (e.getSource() == Jaqua && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new AquaTheme());
            this.updateLookAndFeel();
        } else if (e.getSource() == Jcontrast && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new ContrastTheme());
            this.updateLookAndFeel();
        } else if (e.getSource() == Jemrald && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new EmeraldTheme());
            this.updateLookAndFeel();
        } else if (e.getSource() == Jocean && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new OceanTheme());
            this.updateLookAndFeel();
        } else if (e.getSource() == Jruby && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new RubyTheme());
            this.updateLookAndFeel();
        } else if (e.getSource() == Jsteel && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new DefaultMetalTheme());
            this.boutonsLook="3";
            this.updateLookAndFeel();
        } else if (e.getSource() == Jcharcoal && Jmetal.isSelected()) {
            MetalLookAndFeel.setCurrentTheme(new CharcoalTheme());
            this.boutonsLook="2";
            this.updateLookAndFeel();
        } 
    }
Je change de jeu de boutons avec la ligne par exemple,
mais pour le moment ça ne modifie que le look et pas les boutons...Comment faire ???