Java SWT application - Bring To Front

前端 未结 4 1230
小鲜肉
小鲜肉 2021-02-15 03:00

I am currently developing an SWT java application on Windows 7. Usually the application will be minimized, and when there is an event on the serial port the application should m

4条回答
  •  余生分开走
    2021-02-15 03:33

    You need to set the style bit SWT.ON_TOP on your Shell instance. Unfortunately setting style bits is only possible in the constructor.

    But if I understand your use case setting that bit might be viable for you, since you only seem to toggle between minimized and maximized state.

    If that's not possible, simply dispose and re-create your shell and its contents, when you want to toggle between states.

提交回复
热议问题