public static void flashBackground(Component c, Color flashColor, int flashCount) { me.c = c; me.flashColor = flashColor; me.flashCount = flashCount; synchronized (me.semaphore) { me.semaphore.notifyAll(); } }
void jListOnlineUsers_mouseClicked(MouseEvent e) { if (e.getClickCount() == 2) { jTextFieldTargetUser.setText(((HostItem) jListOnlineUsers.getSelectedValue()).name); Flasher.instance().flashBackground(jTextFieldTargetUser, Color.yellow, 2); jTextFieldSendMessages.requestFocus(); } }
public Client() { try { currentInstance = this; jbInit(); Flasher.instance(); // initialize the flasher instance so that it's currently running initializeAttributeSets(); } catch (Exception e) { e.printStackTrace(); } }