0

I'm trying to create this game in Java for my school A-level course. I'm currently trying to use an individual button for each of the squares and cannot in any way remove the buttons's background. I've tried setBackground(false) which hides the background, but it is still there so still clickable, which you can imagine completely screws up the board.

Ultimately what I'm asking is how to make a button from a picture the same size as the picture, without any extra backgrounds at all, not just hidden.

Here is a picture of what I mean:

Any help/suggestions would really be appreciated, I'm desperate!

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Mikeymca
  • 33
  • 1
  • 6

1 Answers1

0

There was a question on here for creating custom buttons with java: Creating a custom button in Java

The answer to this question might solve your problem.

Community
  • 1
  • 1
Alos
  • 2,657
  • 5
  • 35
  • 47