• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

JDialog undecorated with Metal Look and Feel

 
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
joke time: What is brown and sticky? ... ... ... A stick! Use it to beat this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic