 <p>That's because when the <code>JTextField</code> is shown, the <code>mouseExited()</code> method is immediately called. Then of course the <code>JLabel</code> is shown again and this loops while you keep moving the mouse.</p> <p>The following works:</p> <pre><code> jl.addMouseListener(new MouseAdapter() { public void mouseEntered(MouseEvent evt) { cl.show(jp, "2"); } }); jtf.addMouseListener(new MouseAdapter() { public void mouseExited(MouseEvent evt) { cl.show(jp, "1"); } }); </code></pre>