rem: button.setMnemonic(KeyEvent.VK_I); button.addActionListener(new ActionListener({ actionPerformed : function() { numClicks += 1; label.setText(labelPrefix + numClicks); } })); 
add: button.mnemonic = KeyEvent.VK_I;   button.addActionListener(function() { numClicks += 1; label.setText(labelPrefix + numClicks); }); 
context: function createComponents() {    var labelPrefix = "Number of button clicks: ";    var numClicks = 0;    var label = new JLabel(labelPrefix + numClicks);    var button = new JButton("I'm a Swing button!");    button.setMnemonic(KeyEvent.VK_I);    button.addActionListener(new ActionListener({	actionPerformed : function() {	    numClicks += 1;	    label.setText(labelPrefix + numClicks);	}    }));    label.setLabelFor(button);    /*     * An easy way to put space between a top-level container     * and its contents is to put the contents in a JPanel     * that has an "empty" border.     */    var pane = new JPanel();    pane.setBorder(BorderFactory.createEmptyBorder(                                                   30, //top                                                   30, //left                                                   10, //bottom                                                   30) //right		   );    pane.setLayout(new GridLayout(0, 1));    pane.add(button);    pane.add(label);    return pane;}
meta: 9191	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9191/11eddf0c611b2537267e99835d22096964c80528/SwingApplication.js/clean/examples/SwingApplication.js