package fenetres.create_act; import java.awt.event.ActionEvent; import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.io.IOException; import javax.swing.AbstractAction; import javax.swing.Action; import javax.swing.ImageIcon; import javax.swing.KeyStroke; import fenetres.create; public class actDocumentation extends AbstractAction{ /** * */ private static final long serialVersionUID = 1L; { putValue( Action.NAME, "Documentation" ); putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/documentationmini.png")) ); putValue( Action.MNEMONIC_KEY, KeyEvent.VK_D ); putValue( Action.SHORT_DESCRIPTION, "Documentation (CTRL+D)" ); putValue( Action.ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_D, InputEvent.CTRL_DOWN_MASK) ); } @Override public void actionPerformed(ActionEvent e) { try { String url = "https://sites.google.com/view/analyseWriter"; java.awt.Desktop.getDesktop().browse(java.net.URI.create(url)); } catch (IOException e1) { e1.printStackTrace(); } } }