Nest « Event « Java Swing Q&A





1. Calling this from inside a nested Java ActionListener    stackoverflow.com

Suppose I have this:

class external
{
    JFrame myFrame;
    ...

    class internal implements ActionListener
    {
       ...

2. "Nested" ActionListeners in Java?    stackoverflow.com

I am develop[ing an application where entry of a ticker symbol in a textfield invokes the plot of a stock price chart. I also want to modify this chart in ...

3. Advantages to Nested Classes For Listeners in GUIs    stackoverflow.com

For decently sized projects I've been told that when you have classes extending JPanels that the best practice is to use nested classes to implement the listeners. For example I could ...

4. Nested class vs implements ActionListener    stackoverflow.com

Are there any benefits or drawbacks to creating a nested class that implements ActionListener:

public class Foo{
    Foo(){
        something.addActionListener(new ButtonListener());
   ...