Need help moving the buttons using JPanel GridLayout in Java? [duplicate]
问题 This question already has an answer here : How to create a Futoshiki GUI using JPanel in Java? (1 answer) Closed 24 days ago . I want to move my buttons for my GUI game which is a 9x9 grid so the buttons appear as the image below. I have tried hard but can not figure it out. The current issue I am having. What I want it to look like. public FutoshikiGUI() { grid = new JPanel(new GridLayout(0,9)); cells = new PanelCell[5+1][5+1]; for (int row=1; row<=5; row++) { for (int col=1; col<=5; col++)