Ok so im building a level editor for this game. What the code i cant working does is, when the button is clicked it should get the selected cell from the jtable and set a value for it. However, for some reason I cannont get it working. Here is the code:
for (int y = 0; y < 30; y++)
{
for (int x = 0; x < 30; x++)
{
if(wallChooser.isCellSelected(y, x));
{
wallChooser.getModel().setValueAt(value, y, x);
System.out.println("works again" + x + " " + y);
value = "";
}
}
}
when i run the application for some reason it just print works again for every single cell. But the selected cell does not get the value.
Please help,
thanks
jakx12