title: Java Method Call Expected
body: <p>This is a java program with two buttons used to change an integer value and display it.
  However in IntelliJIDEA the two lines with </p>
  
  <pre><code>increase.addActionListener(incListener());
  decrease.addActionListener(decListener());
  </code></pre>
  
  <p>keep displaying errors 'Method call expected'. <p>
  I am not sure what to do to fix this. <p>
  Any help will be greatly appreciated <p>
  Thanks</p>
  
  <p><p>Note: the full code is attached below.</p>
  
  <pre><code>import javax.swing.*;
  import java.awt.event.ActionEvent;
  import java.awt.event.ActionListener;
  
  public class Main extends JDialog {
  public JPanel contentPane;
  public JButton decrease;
  public JButton increase;
  public JLabel label;
  
  public int number;
  
  public Main() {
      setContentPane(contentPane);
      setModal(true);
  
      increase = new JButton();
      decrease = new JButton();
      increase.addActionListener(incListener());
      decrease.addActionListener(decListener());
  
      number = 50;
      label = new JLabel();
  }
  
  public class incListener implements ActionListener {
      public void actionPerformed (ActionEvent event) {
          number++;
          label.setText("" + number);
      }
  }
  
  public class decListener implements ActionListener {
      public void actionPerformed (ActionEvent event) {
          number--;
          label.setText("" + number);
      }
  }
  
  public static void main(String[] args) {
      Main dialog = new Main();
      dialog.pack();
      dialog.setVisible(true);
      System.exit(0);
  
  }
  }
  </code></pre>