33 lines
840 B
Java
33 lines
840 B
Java
|
package fenetres.create_act;
|
||
|
|
||
|
import java.awt.event.ActionEvent;
|
||
|
import java.io.IOException;
|
||
|
|
||
|
import javax.swing.AbstractAction;
|
||
|
import javax.swing.Action;
|
||
|
import javax.swing.ImageIcon;
|
||
|
|
||
|
|
||
|
public class actLicence extends AbstractAction{
|
||
|
|
||
|
/**
|
||
|
*
|
||
|
*/
|
||
|
private static final long serialVersionUID = 1L;
|
||
|
{
|
||
|
putValue( Action.NAME, "Licence" );
|
||
|
putValue( Action.SMALL_ICON, new ImageIcon( getClass().getResource("/resources/GPLv3mini.png") ) );
|
||
|
putValue( Action.SHORT_DESCRIPTION, "Affiche la page de la licence" );
|
||
|
}
|
||
|
@Override
|
||
|
public void actionPerformed(ActionEvent e) {
|
||
|
try {
|
||
|
String url = "https://www.gnu.org/licenses/gpl-3.0.html";
|
||
|
java.awt.Desktop.getDesktop().browse(java.net.URI.create(url));
|
||
|
} catch (IOException e1) {
|
||
|
e1.printStackTrace();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
}
|