Change the appearance of a JInternalFrame

984 views Asked by At

I have a JInternalFrame which is behaving in quite an odd way. I am currently developing my application on a Windows 8 machine and have set the application to run with native looks, this means all my JFrames and JDialogs look like native Windows 8 windows. The JInternalFrame is different, for some reason it seems to of inherited the Windows 7 aero look and feel!

Here is a screenshot: JInternalFrame look and feel error

You will also notice the close button has been cut off slightly. The code I am using to create the JInternalFrame is as follows:

editor = new BubbleEditor(app); // An extended JInternalFrame
editor.putClientProperty("JInternalFrame.isPalette", Boolean.TRUE);
app.add(editor); // app is a JFrame that contains a JDesktopPane
editor.setSize(200, 100);
editor.setLocation(100, 100);
editor.setVisible(false);
try {
editor.setSelected(true);
} catch (java.beans.PropertyVetoException e) {}

I get exactly the same problem when I try a blank JInternalFrame in a fresh project. I just want to know if there is a way to get the actual native appearance of the OS and apply it to a JInternalFrame.

0

There are 0 answers