@Override
public void doClick()
{
if (isEnabled())
{
setBounds(getBounds().x+1,getBounds().y+1,getWidth(), getHeight());
paintImmediately(0,0,getWidth(), getHeight());
try {
Thread.currentThread();
Thread.sleep(100);
} catch(InterruptedException ie) {
}
setBounds(getBounds().x-1,getBounds().y-1,getWidth(), getHeight());
paintImmediately(0,0,getWidth(), getHeight());
}
}
@Override
public void mousePressed(MouseEvent e)
{
if (isEnabled())
{
setBounds(getBounds().x+1,getBounds().y+1,getWidth(), getHeight());
repaint();
}
}
@Override
public void mouseReleased(MouseEvent e)
{
if (isEnabled())
{
setBounds(getBounds().x-1,getBounds().y-1,getWidth(), getHeight());
repaint();
}
}
@Override
public void doClick()
{
if (isEnabled())
{
setBounds(getBounds().x+1,getBounds().y+1,getWidth(), getHeight());
paintImmediately(0,0,getWidth(), getHeight());
try {
Thread.currentThread();
Thread.sleep(100);
} catch(InterruptedException ie) {
}
setBounds(getBounds().x-1,getBounds().y-1,getWidth(), getHeight());
paintImmediately(0,0,getWidth(), getHeight());
}
}
@Override
public void mousePressed(MouseEvent e)
{
if (isEnabled())
{
setBounds(getBounds().x+1,getBounds().y+1,getWidth(), getHeight());
repaint();
}
}
@Override
public void mouseReleased(MouseEvent e)
{
if (isEnabled())
{
setBounds(getBounds().x-1,getBounds().y-1,getWidth(), getHeight());
repaint();
}
}