HelpDialog(JFrame parent) { // is private, use showHelp() to create it in a new thread
		this.setTitle("SINALGO Help  (source: http://dcg.ethz.ch/projects/sinalgo)");
		GuiHelper.setWindowIcon(this);
		this.addWindowListener(this);
		restoreWindowState();
		
		this.setLayout(new BorderLayout());
		this.setResizable(true);

		JPanel topPanel = new JPanel();
		this.add(topPanel, BorderLayout.NORTH);
		topPanel.setLayout(new BorderLayout());
		topPanel.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
		topPanel.add(menuButton, BorderLayout.WEST);
		menuButton.addActionListener(this);
		

		html = new JEditorPane();
		JScrollPane scroller = new JScrollPane(); 
		JViewport vp = scroller.getViewport(); 
		vp.add(html); 
		this.add(scroller, BorderLayout.CENTER); 
		
		try {			
			defaultURL = new URL("http://dcg.ethz.ch/projects/sinalgo/tutorial/Documentation.html?menu"); 
			currentURL = defaultURL;
			html.setPage(currentURL);
	    html.setEditable(false); 
	    html.addHyperlinkListener(getLinkListener());
		} catch (MalformedURLException e1) {
			html.setText("Cannot display the page.\n" + e1.getMessage());
		} catch (IOException e1) {
			html.setText("Cannot display the page.\n" + e1.getMessage());
		}	
		
		// Detect ESCAPE button
		KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
		focusManager.addKeyEventPostProcessor(new KeyEventPostProcessor() {
			public boolean postProcessKeyEvent(KeyEvent e) {
				if(!e.isConsumed() && e.getID() == KeyEvent.KEY_PRESSED && e.getKeyCode() == KeyEvent.VK_ESCAPE) {
					HelpDialog.this.setVisible(false);
				}
				return false;
			}
		});
		
		this.pack();
		this.setVisible(true);
	}