Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You have an issue with <a href="http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html" rel="nofollow noreferrer">Concurency in Swing</a>. Swing is single threaded, and all output to the Swing GUI must be done on EDT. </p> <ul> <li><p>basically you can solve that by wrapping output to the GUI in <code>invokeLater</code> or <code>invokeAndWait</code></p></li> <li><p>correct way would be invoke background task(s) from <code>SwingWorker</code> or <code>Runnable#Thread</code> (in <code>Runnable</code>, output must be wrapped into <code>invokeLater</code> or <code>invokeAndWait</code>) </p></li> </ul> <p>EDIT</p> <pre><code>import java.awt.*; import java.util.*; import javax.swing.*; public class SSCCE extends JFrame { private static final long serialVersionUID = 1L; public SSCCE() { super("SSCCE"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setContentPane(createContent()); pack(); centerFrameOnMonitor(0); setVisible(true); } private JComponent createContent() { JPanel ret = new JPanel(); JButton button = new JButton("I have a tooltip"); button.setToolTipText("I wonder where this tooltip is going to popup!"); ret.add(button); return ret; } /** * Centers this frame in the middle of the monitor with the monitorIndex specified. This method assumes that all monitors are laid out * horizontally. The 0th index monitor would be the one furthest left. * @param monitorIndex */ private void centerFrameOnMonitor(int monitorIndex) { GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice[] devices = e.getScreenDevices(); if (monitorIndex &lt; 0 || monitorIndex &gt;= devices.length) { throw new RuntimeException("Monitor Index out of bounds: " + monitorIndex); } Arrays.sort(devices, new Comparator&lt;GraphicsDevice&gt;() { @Override public int compare(GraphicsDevice a, GraphicsDevice b) { return (int) (a.getDefaultConfiguration().getBounds().getX() - b.getDefaultConfiguration().getBounds().getX()); } }); GraphicsConfiguration gc = devices[monitorIndex].getDefaultConfiguration(); Rectangle gcBounds = gc.getBounds(); Point p = new Point((int) (gcBounds.getX() + (gcBounds.getWidth() / 2 - this.getWidth() / 2)), (int) (gcBounds.getY() + (gcBounds.getHeight() / 2 - this.getHeight() / 2))); this.setLocation(p); } public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { SSCCE sSCCE = new SSCCE(); } }); } } </code></pre> <p>EDIT2:</p> <p>Capabilities Test retuns</p> <p><img src="https://i.stack.imgur.com/2hha3.jpg" alt="enter image description here"></p> <p>from HP Elite, WinXp, Java6, low profile GPU </p> <p><img src="https://i.stack.imgur.com/Pu5jJ.jpg" alt="enter image description here"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload