Decoración JInternalFrame

Internal frame Decoration

I would like to know, is there any way to set my internal frame decoration as normal window decoration instead look like the image inside the link above? Thank you very much.

preguntado el 29 de julio de 12 a las 09:07

1 Respuestas

I'd say not. The internal frame decorations are supplied by the look & feel, where as the JFrame & JDialog's get there decorations from the OS.

Having said that, there are some Look & Feels that supply custom decorations themselves (to the top level windows).

Metal for instance has the following UI properties:

RootPane.colorChooserDialogBorder = javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder@182d9c06
RootPane.errorDialogBorder = javax.swing.plaf.metal.MetalBorders$ErrorDialogBorder@63b9240e
RootPane.fileChooserDialogBorder = javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder@687b6889
RootPane.informationDialogBorder = javax.swing.plaf.metal.MetalBorders$DialogBorder@7e0c2ff5
RootPane.plainDialogBorder = javax.swing.plaf.metal.MetalBorders$DialogBorder@5a5e5a50
RootPane.questionDialogBorder = javax.swing.plaf.metal.MetalBorders$QuestionDialogBorder@95c083
RootPane.warningDialogBorder = javax.swing.plaf.metal.MetalBorders$WarningDialogBorder@61b383e9

Using these you should be able to swap the internal frame's border.

But under the default system look and feel for windows RootPane only supplies the following properties...

RootPane.ancestorInputMap = javax.swing.plaf.InputMapUIResource@4ba33d48
RootPane.defaultButtonWindowKeyBindings = [Ljava.lang.Object;@1cc7b00c
RootPaneUI =

Now...there might be away to get this to work using JNI, but I suspect because Swing uses a lightweight painting process, it would only end in a mess.

Respondido 29 Jul 12, 11:07

@trashgod Thanks for the info, looks interesting! - Programador loco

@MadProgrammer,trashgod, thanks for your info and explanation. I appreciate it! - campana

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.