title: SetFocusable method or Focusing Components Java
body: <p>I came across this code:</p>
  <pre><code>public class Board extends JPanel implements ActionListener{
  
      public Board() {
          setFocusable(true); 
      }
  }
  </code></pre>
  <p>What exactly does <code>setFocusable(true)</code> do to the JPanel object? What is the notion of a component being focused?</p>
  <p>Based on the Java API, this method is located in the Component class, the super class of JPanel. The method description states &quot;Sets the focusable state of this Component to the specified value. This value overrides the Component's default focusability.&quot; This description sounds way too technical and high-level jargon for me (who just finished a Java class in the summer). Sometimes, I think these method descriptions were not written for all people with different levels of knowledge of Java. May someone explain the method description in layman's terms?</p>