Hi I want to change the location of my button by setBounds doest work is there anyway that I can change the location of my Button?
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);
}
}