Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
02-22-2011, 05:31 AM #1
- Join Date
- Feb 2011
- Thanked 0 Times in 0 Posts
Help in creating grid points using java swing
I am new to java swing programming.I want to develop an application which has a panel with an array of grid points(not grid cells). The number of columns and rows of the grid points must be user specific.
Once such an environment is created, the user's mouse click on the diff grid points must be captured and those points alone must be highlighted in a different color. As of now, i've only created the Jpanel.
I know it is possible to get the coordinates of the mouse click use mouse events, but i do not know how to place the grid points in the environment and assign them each a co-ordinate so that i catch them back on user's mouse click.
Since i am completely new into this, kindly elaborate me on how i proceed on with this.
since the code ive developed so far, only creates the panel and the text box, i've not included it here.
Forgive me if i didn't come out with the clear picture.
Thanks in advance