private void addIndexnode(final MainFrame frame) { String result = (String) JOptionPane.showInputDialog( null, "Enter the URL of the new indexnode:", "New Indexnode", JOptionPane.QUESTION_MESSAGE, null, null, ""); if (result == null) return; try { if (!result.toLowerCase().startsWith("http://")) result = "http://" + result; final URL resURL = new URL(result); Thread elsewhere = new Thread( new Runnable() { @Override public void run() { comm.registerNewIndexNode(resURL); } }); elsewhere.setDaemon(true); elsewhere.setName("Add new indexnode thread"); elsewhere.start(); frame.setStatusHint("Added: " + result + "... It might take a few seconds to show up..."); } catch (MalformedURLException e1) { frame.setStatusHint( new StatusHint( frame.getGui().getUtil().getImage("error"), "Invalid new indexnode URL! (" + e1.getMessage() + ")")); Logger.log("Invalid new indexnode url: " + e1); } }
@Override public void mouseEntered(MouseEvent e) { if (e.getSource() == message) { frame.setStatusHint("Enter your message here"); } else if (e.getSource() == sendMessage) { frame.setStatusHint("Click to send your message"); } else if (e.getSource() == avatarTable) { frame.setStatusHint("Lists everyone connected to the index node"); } }