how to make frame undecorated after jTattoo theme installed

后端 未结 1 1105
陌清茗
陌清茗 2021-01-14 07:47

after using jTattoo LookAndFeel,

try {
       UIManager.setLookAndFeel(new McWinLookAndFeel());
       new Main(new UserModel()).setVisible(true);

     } ca         


        
相关标签:
1条回答
  • 2021-01-14 08:25

    I had the same problem and because this API is not enough documented it may be difficult to figure out how to solve this.

    The problem comes because the theme overides the standard application bar so the theme has to hide it too. I spent few minutes looking through classes code and I found out this solution. After you set the look and feel if you want to go in fullscreen mode, first you have to remove the border. So before setting:

    this.undecorated(true);
    

    remove the borders:

    DecorationHelper.decorateWindows(false);
    

    P.S before leaving fullscreen you have to redecorate the window:

    DecorationHelper.decorateWindows(true);
    

    It worked for me!

    0 讨论(0)
提交回复
热议问题