Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 56 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. private void createActions() {
  2.     getRootPane().getActionMap().put(CLOSE_ACTION, new CloseAction());
  3. }
  4.  
  5. private void initAction(String key, String label) {
  6.     Action action = getRootPane().getActionMap().get(key);
  7.    
  8.     action.putValue(Action.NAME, label);
  9. }
  10.  
  11. private void initActions() {
  12.     initAction(CLOSE_ACTION, "Close");
  13. }
  14.  
  15. private class CloseAction extends AbstractAction {
  16.     public void actionPerformed(ActionEvent e) {
  17.         System.out.println("Test");
  18.     }
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top