title: How can I find elements by name or id, on a JPanel?
body: <p>I've started to work with Java Swing and I'm asking myself if it is possible to get elements on a generic JPanel, by Id or simply by name.
  I mean something like '<strong>getElementById("example")</strong>', used in javascript.</p>
  
  <p>This is a little example, in pseudo-code of what I'd like to get:</p>
  
  <pre><code>....
  
  myButton = my_panel.getElementById("xxxxxxx");
  
  // OR BY VARIABLE NAME
  
  myButton = my_panel.getElementByVariableName("xxxxxxx");
  
  ....
  </code></pre>
  
  <p>Is that possible in java?</p>