Skip to content

Instantly share code, notes, and snippets.

@michaltakac
Created November 30, 2015 16:40
Show Gist options
  • Save michaltakac/df14f70be3e59dd76ea7 to your computer and use it in GitHub Desktop.
Save michaltakac/df14f70be3e59dd76ea7 to your computer and use it in GitHub Desktop.
jebem ja tvojho boha
// uplne hore importy
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.KeyEvent;
// dalej dakde v pici v kode kde mas zadefinovany ten btnNewButton_5
JMenuItem btnNewButton_5 = new JMenuItem("Ukončiť");
btnNewButton_5.setMnemonic(KeyEvent.VK_E);
btnNewButton_5.setToolTipText("Zavrieť aplikáciu");
btnNewButton_5.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent event) {
System.exit(0);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment