• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDialog undecorated with Metal Look and Feel

 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe I'm doing something silly, but try and I might I don't seem to be able to turn off the title bar, close button etc using the setUndecorated function.

Should this be possible or is there a restriction to the Metal Look and feel.

Thanks

Dave
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> I don't seem to be able to turn off the title bar, close button etc using the setUndecorated function.

are you using 'true' with setUndecorated?
 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I am doing that, if I run the Dialog standalone I get the desired result, but when it's being created and invoked from my application it retains the decorations. It's like it's in inheriting the properties from the parent JInternalFrame.

Dave
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in the absence of any code, all I can guess is that you have a duplicate declaration of the dialog,
when invoked from the internalFrame i.e. the undecorated one is not the one showing
 
David Garratt
Ranch Hand
Posts: 212
Eclipse IDE Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the problem.

In my applications startup (not part of the dialog itself) I had

JDialog.setDefaultLookAndFeelDecorated(true);

I thought this would be a "default" which I could override, however is seems not.

If you set this then you don't seem to have any choice for specific dialogs later on.

Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic