• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1648
  • Last Modified:

Probelm with Undecorated in JFrame

When I tried to do
JFrame.frame.setUndecorated(true);
I am getting this exception
Exception in thread "main" java.awt.IllegalComponentStateException: The frame is
 displayable.
        at java.awt.Frame.setUndecorated(Unknown Source)
        at TransparentBackground.main(TransparentBackground.java:163)

Thanks
0
sangameshrh
Asked:
sangameshrh
  • 2
  • 2
1 Solution
 
sciuriwareCommented:
..... so you should do this BEFORE you say
                 frame.setVisible(true);

;JOOP!
0
 
CEHJCommented:
You need to set that before displaying the frame
0
 
CEHJCommented:
Sorry Joop
0
 
sciuriwareCommented:
Why sorry, nobody harmed.
Pleased to be a help.

;JOOP!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now