View | Details | Raw Unified | Return to bug 57364
Collapse All | Expand All

(-)src/core/org/apache/jmeter/gui/action/LookAndFeelCommand.java (-2 / +12 lines)
Lines 18-23 Link Here
18
18
19
package org.apache.jmeter.gui.action;
19
package org.apache.jmeter.gui.action;
20
20
21
import java.awt.Dialog;
22
import java.awt.Frame;
23
import java.awt.Window;
21
import java.awt.event.ActionEvent;
24
import java.awt.event.ActionEvent;
22
import java.util.ArrayList;
25
import java.util.ArrayList;
23
import java.util.HashSet;
26
import java.util.HashSet;
Lines 29-35 Link Here
29
import javax.swing.UIManager;
32
import javax.swing.UIManager;
30
import javax.swing.UnsupportedLookAndFeelException;
33
import javax.swing.UnsupportedLookAndFeelException;
31
34
32
import org.apache.jmeter.gui.GuiPackage;
33
import org.apache.jmeter.gui.util.JMeterMenuBar;
35
import org.apache.jmeter.gui.util.JMeterMenuBar;
34
import org.apache.jmeter.util.JMeterUtils;
36
import org.apache.jmeter.util.JMeterUtils;
35
import org.apache.jorphan.logging.LoggingManager;
37
import org.apache.jorphan.logging.LoggingManager;
Lines 138-144 Link Here
138
        try {
140
        try {
139
            String className = ev.getActionCommand().substring(ActionNames.LAF_PREFIX.length()).replace('/', '.');
141
            String className = ev.getActionCommand().substring(ActionNames.LAF_PREFIX.length()).replace('/', '.');
140
            UIManager.setLookAndFeel(className);
142
            UIManager.setLookAndFeel(className);
141
            SwingUtilities.updateComponentTreeUI(GuiPackage.getInstance().getMainFrame());
143
            for (Window w : Window.getWindows()) {
144
                SwingUtilities.updateComponentTreeUI(w);
145
                if (w.isDisplayable() &&
146
                    (w instanceof Frame ? !((Frame)w).isResizable() :
147
                    w instanceof Dialog ? !((Dialog)w).isResizable() :
148
                    true)) {
149
                    w.pack();
150
                }
151
            }
142
            PREFS.put(USER_PREFS_KEY, className);
152
            PREFS.put(USER_PREFS_KEY, className);
143
        } catch (javax.swing.UnsupportedLookAndFeelException e) {
153
        } catch (javax.swing.UnsupportedLookAndFeelException e) {
144
            JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());
154
            JMeterUtils.reportErrorToUser("Look and Feel unavailable:" + e.toString());

Return to bug 57364