I'm makeing a game where I want to be able to click on a rectangle and perform a piece of code.
I want the button to be transparent and at x, y coordinates with the right size... I've been searching and not found anything of help. So can someone of you help?
I'm Using Java 1.7
I've tried
button.setOpaque(false);
button.setContentAreaFilled(false);
button.setBorderPainted(false);
button.setVisible(false);
bDice1.setLayout(null);
bDice1.setLocation(30, 40);
bDice1.setSize(12, 12);