title: Passing argument to ActionListener from Object
body: <pre><code>public class start implements ActionListener {
  
      public void actionPerformed(ActionEvent aL) {
        method(arguments);
  
      }
    }
  
  method(arguments) {
     //stuff
  }
  </code></pre>
  
  <p>I want a JButton to tell the program to start a method using the arguments "stuff" So I put the actionListener above on the button however the actionListener does not have access to the arguments and I don't know how to give it them (I looked at the oracle docs and couldn't figure it out). I tried this:</p>
  
  <pre><code>actionPerformed(ActionEvent aL, stuff) {
  </code></pre>
  
  <p>and that doesn't work, I get the error</p>
  
  <pre><code>Compute.java:45: error: Compute.start is not abstract and does not override abstract method actionPerformed(ActionEvent) in ActionListener
    public class start implements ActionListener {
           ^
  </code></pre>
  
  <p>And I tried putting an @Override but you can't override that according to the compiler. So, how can I give the arguments to the ActionListener or have the method outside of the button but only start working once the button is pressed, however I am using a JProgressBar within the JFrame the button is in which uses the method as it's timer thing so it would be preferable to pass the arguments to the actionListener</p>
  
  <p>Also, above is the action Listener, outside of that is the object with the button that uses the actionListener:</p>
  
  <pre><code>//imports
  public class someObject extends JFrame {
  //attributes
  public someObject() {
  
  //blah blah
  
  go = new JButton("Compute!");
  
  start c = new start();
      go.addActionListener(c);
  </code></pre>
  
  <p>So yea basically how do I pass arguments from the Object to the ActionListener?</p>