please someone tell me how to change the size of the button.the code:
JButton button1 = new JButton();
JButton button1 = new JButton();
public Mainmenu() {
setLayout(new FlowLayout(100,278,158));
Icon button2= new ImageIcon(getClass().getResource("button1.jpg"));
button2=new JButton(button2);
add(button);
Icon button2= new ImageIcon(getClass().getResource("button2.jpg"));
button2=new JButton(button2);
add(button2);
HandlerC hand = new HandlerC();
button1.addActionListener(hand);
button2.addActionListener(hand);
}
private class HandlerC implements ActionListener {
public void actionPerformed(ActionEvent e) {
}
}
}