title: Java - Call Method via JButton
body: <p>How can I call a method by pressing a JButton?</p>
  
  <p>For example:</p>
  
  <pre><code>when JButton is pressed
  hillClimb() is called;
  </code></pre>
  
  <p>I know how to display messages etc when pressing a JButton, but want to know if it is possible to do this?</p>
  
  <p>Many thanks.</p>