Java / Swing -> Creating a notification JFrame, and the error “The frame is displayable”

后端 未结 2 436
暗喜
暗喜 2020-12-11 23:24

Ok, I am not that versed in Java / Swing, and I am running into a problem. My application is throwing this error: \"Exception in thread \"AWT-EventQueue-0\" java.awt.Illegal

2条回答
  •  星月不相逢
    2020-12-11 23:34

    The error you are getting is calling setUndecorated(true) after the frame is made displayable by calling pack(). Call setUndecorated before pack and it should work.

提交回复
热议问题