Different uicontrol appearance in a compiled GUI.

1 Ansicht (letzte 30 Tage)
Jan Bartonicek
Jan Bartonicek am 24 Feb. 2016
Kommentiert: Meade am 13 Jun. 2017
I created a GUI with few pushbuttons without changing any appearance settings:
But after a compilation and running the app the buttons changed:
This happened to me after upgrading to 2015b, 2014b version worked well. Do you know how to control the uicontrol appearance after a compilation? Thank you.

Akzeptierte Antwort

Jan
Jan am 24 Feb. 2016
  1 Kommentar
Meade
Meade am 13 Jun. 2017
For posterity, here is the workaround suggested above. This worked for me.
% Java look-and-feel (known 2015b bug)
try
if ispc
lfcode = 'com.sun.java.swing.plaf.windows.WindowsLookAndFeel';
elseif isunix
lfcode = 'com.jgoodies.looks.plastic.Plastic3DLookAndFeel';
elseif ismac
lfcode = 'com.apple.laf.AquaLookAndFeel';
end
javax.swing.UIManager.setLookAndFeel(lfcode)
catch
% Silent catch
end

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Migrate GUIDE Apps finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by