MATLAB: Hide maximize/minimize and close buttons for a figure window

figureMATLABmatlab guiwindow

I have a figure window and I want to remove the maximize/minimize and close buttons of it. I can not use any type of Java containers (JWindow, JPanel, …) because they are not allowed to be Matlab components' parents. I am thinking of using some Java removeComponent command o something like this (I do not know if it will work). However, when I try to look for that buttons inside the structure of components through jf handle, I do not find where they are kept. Here is my code:
fh = figure('Menu','none','Toolbar','none');
jf = get(handle(fh),'JavaFrame');
drawnow;
jf.set,

Best Answer

If you are working under Windows, you can crop the complete window border using FEX: WindowAPI:
WindowAPI(gcf, 'Clip', true);