0

I am trying to create a circular chess game. Normally, I can create a chess game by using GridLayout. Right now my tiles extend JLabel.

But, I want to add my tiles so that it arranges themselves circularly as shown in the following picture...enter image description here

What is the easiest way of achieving this?

jCoder
  • 36
  • 8
  • i would use a jpanel where u draw your picture on and then determine where your mouse at. @jCoder – Z3RP Apr 23 '19 at 05:37
  • @Z3RP If so then how can I selectively put my pieces on certain areas of that JPanel, and then update it? – jCoder Apr 23 '19 at 05:50
  • This becomes complex very quickly. [For example](https://stackoverflow.com/questions/14617849/graphics2d-circular-table/14618776#14618776). This creates a series of shapes, which can be used to determine where the user clicks by using it's `contains` method – MadProgrammer Apr 23 '19 at 05:52
  • @jCoder you must know which piece you want to move and update the image/graphics after you placed the piece. MadProgrammer has a great example. – Z3RP Apr 23 '19 at 06:04

0 Answers0