title: JFrame ActionListener
body: <pre><code>JFrame myframe = new JFrame("My Sample Frame");
    JButton mybutton = new JButton("Okay");
  </code></pre>
  
  <p>Can someone explain to me these part.</p>
  
  <pre><code> mybutton.addActionListener(new ActionListener(){
  
    public void actionPerformed(ActionEvent evt){
  
    //Assuming that the content here will do something.
  
    }
  </code></pre>