Java SWT application - Bring To Front

前端 未结 4 1217
深忆病人
深忆病人 2021-02-15 03:23

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:32

    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.

提交回复
热议问题