title: Creating an invisible button in Java Swing
body: <p>I have seen many times on Java Swing GUIs buttons that look like images until the mouse rolls over them. They appear to not have their content area filled. When the mouse rolls over them, the content area fills in but the button looks as though the mouse is not hovering over it. An example of this would be the toolbar of buttons used to activate each demo in SwingSet2.</p>
  
  <p>How is this effect possible?</p>
  
  <p><strong>EDIT:</strong> Here are images that illustrate my question:</p>
  
  <p><b>Default State</b><br><img src="https://i.stack.imgur.com/zpPWo.png" alt="button_default.png"></p>
  
  <p><b>Hover State</b><br><img src="https://i.stack.imgur.com/RpIii.png" alt="button_hover.png"></p>
  
  <p><b>Clicked (Active) State</b><br><img src="https://i.stack.imgur.com/7uco7.png" alt="button_active.png"></p>
  
  <p>These are using the Window Look&amp;Feel on Vista. The images were captured from the SwingSet2 demo toolbar.</p>
  
  <p>Thanks!</p>