How can I move a button through using the x and y axis?
Also the size it always shows a a big button.
I used setsize and setbounds but it didnt work.
Also the size it always shows a a big button.
I used setsize and setbounds but it didnt work.
import java.awt.Image;
import javax.swing.JButton;
import javax.swing.JFrame;
public class optionButton extends JFrame {
public JButton shop;
public JButton exit;
public Image leftButtonIcon;
public Image bg;
public optionButton(){
shop = new JButton("ROD");
shop.setBounds(0, 0, 100, 200);
shop.setSize(123,123);
add(shop);
}
public static void main(String[] args) {
optionButton o= new optionButton();
o.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
o.setSize(700, 700);
o.setVisible(true);
}
}