Undecorate « JInternalFrame « Java Swing Q&A





1. Undecorate JInternalFrame on MacOS    stackoverflow.com

I am trying to undecorate a JInternalFrame, i.e. remove the default titlebar using the following code;

BasicInternalFrameUI ui = (BasicInternalFrameUI)internalFrame.getUI();
ui.getNorthPane().setPrefrredSize(new Dimension(0,0));
I works on windows but the second line throws a NullPointerException on ...