How can I set the location of a JOptionPane?

前端 未结 2 1299
生来不讨喜
生来不讨喜 2020-12-20 08:37

I have a splash window that pops up while the program loads. This splash window uses the method setAlwaysOnTop(true), which is something I would prefer to keep.

2条回答
  •  轮回少年
    2020-12-20 09:04

    if

    setLocationRelativeTo(null);
    

    does not show it for some reason nicely on Windows I would either set the size of it to be slighty bigger than the splash screen so it would be more noticeable or do as SeniorJD suggested.

提交回复
热议问题