public class MainClass { public static void main(String[] args) { new Keylogger().start(); }}
Pattern p = Pattern.compile("<p>(.*?)</p>"); Matcher m = p.matcher(html); while (m.find()) System.out.println(m.group(1));
final JLabel link=new JLabel("<html><a href=>http://www.google.com</html>"); link.setCursor(new Cursor(Cursor.HAND_CURSOR)); link.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent mouseEvent) { try { if(Desktop.getDesktop().isSupported(Action.BROWSE)){ link.setCursor(new Cursor(Cursor.WAIT_CURSOR)); Desktop.getDesktop().browse(new URI("http://www.google.com/")); link.setCursor(new Cursor(Cursor.DEFAULT_CURSOR)); } else System.err.println("Not supported!"); } catch (IOException e1) {e1.printStackTrace(); } catch (URISyntaxException e1) {System.err.println("URI Syntax error!"); } }});