java - Storing 2D array points in to a variable -


Sorry if the top title is not informative or I do not know how I want to see it.

I have a 2D array in Java

  Personal Zebtons [] [] JbGrid = New Payton [30] [21];  

And what I want to do is hold 10 values ​​in the first array and 11th value in the second array and tell them the story in the same variable.

If this is not possible, then two variables should work. For example, you can see that I have stored numbers from the array to MOUSE_X and MOUSE_Y, but this is easy because it will update the value on click.

 for  (int i = 0; i <+ 30; i ++) {for (int j = 0; j & lt; 21; j ++) {if (E .getSource () == JB Grid [I] [J]) {mouse_x = J; MOUSE_Y = i; // jPpanelMain.revalidate (); // jPpanelMain.repaint (); RunTimer (); ReColour (); System.out.println ("Mouse X:" + MOUSE_X + "Mouse Y:" + MOUSE_Y); }}}  

How can I store prices in a variable from 2D array.

If you are searching only for classes that will store X and Y values ​​that you < Code> point .


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -