删除MATLAB gui中的标题栏

时间:2014-08-20 06:25:19

标签: matlab user-interface matlab-guide

如何删除title bar中的MATLAB GUI?我想要一个没有任何title bar closemaximizeminimize按钮的空白窗口。

感谢。

1 个答案:

答案 0 :(得分:3)

适用于OSX和Windows的解决方案:

img = imread('peppers.png');  %# A sample image to display
jimg = im2java(img);
frame = javax.swing.JFrame;
frame.setUndecorated(true);
icon = javax.swing.ImageIcon(jimg);
label = javax.swing.JLabel(icon);
frame.getContentPane.add(label);
frame.pack;
screenSize = get(0,'ScreenSize');  %# Get the screen size from the root object
frame.setSize(screenSize(3),screenSize(4));
frame.setLocation(0,0);
frame.show;