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 MacOS
Any ideas why and how to get round it?