How to hide the default minimize/maximize and close buttons on JFrame window in Java?

后端 未结 5 653
青春惊慌失措
青春惊慌失措 2021-01-02 22:35

I would like to know if it is possible to create a JFrame window which has no default maximize/minimize(-) and close(x) buttons! I have added custom buttons on

5条回答
  •  天涯浪人
    2021-01-02 23:01

    You can use JWindow because is by default un_decorated, but you can setUndecorated() for JFrame/JDialog

    another ways are

    • implements WindowListener

    • setDefaultCloseOperations

提交回复
热议问题