Easy fix, changed the HexButton to inherit from JComponent and implemented MouseInputListener for the clicks.
Works like a charm.
Thanks for the feedback!
Type: Posts; User: Souls512
Easy fix, changed the HexButton to inherit from JComponent and implemented MouseInputListener for the clicks.
Works like a charm.
Thanks for the feedback!
I have attached an image of what I see when running the code and clicking on the image.
If that is not what you are seeing ... very odd. I am using Eclipse (not that I would think that would...
To add a little explanation.
I have gone though this code extensively.
I am simply new to Swing and not sure why it does not behave the way it "looks" like it should.
The gist is:
There is a...
I am attempting to make a Hexagon based board.
My first attempt was a JPanel that I repeatedly drew a hexagon image on. This had slowness issues when placed in a JScrollPane.
Searching for a...