How can I flash the Windows taskbar using Swing?

前端 未结 5 465
小鲜肉
小鲜肉 2020-12-03 22:23

I\'m developing a Swing application and I need to flash the Windows taskbar. I can\'t use frame.requestFocus() because I don\'t want to steal focus from any oth

5条回答
  •  清歌不尽
    2020-12-03 23:03

    The best way to do this:

    if (!isFocused()) {
            setVisible(false);
            setVisible(true);
        }
    

提交回复
热议问题