myPanel.add( getMyButton() );

private JButton getMyButton()
   {
   return myButton;
   }