import javax.swing.ImageIcon;
import javax.swing.JButton;
public class Main {
public static void main(String[] argv) throws Exception {
JButton button = new JButton(new ImageIcon("image.gif"));
button.setToolTipText("Button Name");
button.getAccessibleContext().setAccessibleName("Button Name");
}
}