public void addButton(URL url,String info,ActionListener al){
  JButton b=new JButton(new ImageIcon(url,info));
  b.setToolTipText(info);
  b.setMargin(new Insets(0,0,0,0));
  b.addActionListener(al);
  b.setBorderPainted(false);
  add(b);
}

public void addButton ( URL url , String info , ActionListener al ) { JButton b = new JButton ( new ImageIcon ( url , info ) ) ; b . setToolTipText ( info ) ; b . setMargin ( new Insets ( 0 , 0 , 0 , 0 ) ) ; b . addActionListener ( al ) ; b . setBorderPainted ( false ) ; add ( b ) ; }
add a button to the panel .
