I had a real weird method which is used to hide JInternalFrame
's title bar. Now the dilemma is below method works on windows platform,
((javax.swing.plaf.basic.BasicInternalFrameUI) aXInternalFrame.getUI()).setNorthPane(null);
But not on Macintosh! Any experts have any idea which can explain internal process which makes this method not usable on Mac.
And is there any method which may work on both platform to hide titlebar of JInternalFrame
?
Thanks
On Mac OS X, an instance of
com.apple.laf.AquaInternalFrameUI
defines the appearance of internal frames. You can minimize the disparity by setting theisPalette
property and disabling the frame icons on Mac OS X specifically, as shown below.This may be a hairy corner of Swing. This functionality wasn't added to swing until java 1.5 as far as i recall.
have you tried the Frame.setUndecorated method?
http://download.oracle.com/javase/1.5.0/docs/api/java/awt/Frame.html#setUndecorated%28boolean%29
If that doesn't work you may need to drop down and do some JNI on the underlying native window object. I had to do this for similar functionality on windows with the 1.4 jvm.