title: Inline object instantiation and transformation in Java
body: <p>I have come to Java from Visual Basic, and seem to think I have been, in many ways, spoiled :p</p>
  
  <p>Is there a way to instantiate an object and modify it inline? Something like:</p>
  
  <pre><code>JFrame aFrame = new JFrame();   
  aFrame.add(new JPanel() {.setSize(100,100) .setLocation(50,50) .setBackground(Color.red) });
  </code></pre>
  
  <p>I was able to <code>@Override</code> methods, but am looking for something simpler. I have search alot, but if there is a specific term for this kind of inline instantiation, it eludes me.</p>
  
  <p>Thank you for your time!</p>