Removing title from MATLAB GUI for full screen display

I created a MATLAB GUI that I would like to display so that it fills the entire screen. Currently, the title is displayed at the very top. Is there any way to hide this header?

I have considered using psychtoolbox for this purpose, which allows you to display full-screen displays, but this does not allow the inclusion of standard MATLAB GUI elements, as I understand it.

(If this is important, this is for OSX. I would obviously hide the menu bar before making the GUI full screen.)

+2
source share
1 answer

I don’t know if this will work for OSX, but on Windows I was able to use the Java code from this MATLAB news stream to create a full screen window with no title, edges, etc. and displaying the image in the middle. Here is how I made the window:

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; 

And you can hide the frame again by doing the following:

 frame.hide; 

Not sure how this will work in general to display the typical MATLAB GUI. I will have to play more with him and find out.

+6
source

Source: https://habr.com/ru/post/1386003/


All Articles