|
From: Brian S. <bs...@bs...> - 2002-02-26 17:33:09
|
feature tip of the day #1: did you know you can make anonymous inner class
instances in the repl?
> final JFrame copy = frame;
[...]
> ActionListener listener = new ActionListener() { public void
actionPerformed(ActionEvent ae) { copy.hide(); } };
> button.addActionListener(listener);
related tip #2: In said anonymous inner class instances, you can reference
final variables that are declared at top-level in the interactions pane.
Pretty cool.
-brian
|