title: Java only allowing global variables to be static?
body: <p>So I just started coding a Java program I'm writing and it's telling me that my global variables need to be static. I don't understand why it's telling me this because I've developed Java programs before without having to make my global variables static. Could someone please help?</p>
  
  <pre><code> import java.awt.event.*;
   import javax.swing.*;
  
   public class PlannerMain {
        JFrame frame;
        JButton makeMap;
  
        public static void main(String[] args){
             frame = new JFrame("Land Planner");
             makeMap = new JButton("Make Map");
             makeMap.addActionListener(new makeMapListener());
             frame.setSize(580,550);
             frame.setVisible(true);
        }
  
        class makeMapListener implements ActionListener{
  
                public void actionPerformed(ActionEvent e) {
  
                }
        }
  
  }
  </code></pre>