java - Move icon from jbutton to jbutton -


I set up a gridlate with 16 buttons in the center. I had placed an icon on the first button.

How do I loop, and when the user selects the next button on the grid, will this icon move from old location to new position?

  Private Arrestists & lt; Jebton & gt; Grid = new arreelist & lt; Jebton & gt; (); JPNEL grid BtnPanel = new zpn (); GridBtnPanel.setLayout (new grid layout (4, 4)); For (Int i = 0; I   

Any help would be great.

Thank you.

You can add an action list to the button, and after pressing a button, a button without any All buttons are searched to find an empty icon, and pressing the button on the button without any empty icon

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -