Originally Posted by
stresstedout
I KNOW ITS NOT PROPERLY FORMATTED I WILL DO ONCE I GET THE BUTTONS ON TOP OF THOSE LABELS. PLEASE HELP ME
First, I am very disappointed by the fact that I continue to give my help and you don't understand.
I have told you to create, for
each cell in GridLayout, a new JPanel that contains JButton and JLabel (laid out with BorderLayout) and put that panel (not button/label) into the GridLayout. I have also posted a valid code.
And this is not what you have done in your last code!
This is my last advice:
......
while (result.next()) {
........
JButton button = ...........
JLabel lPhoto = ...........
........
JPanel cellPanel = new JPanel(new BorderLayout());
cellPanel.add(button, BorderLayout.NORTH);
cellPanel.add(lPhoto, BorderLayout.CENTER);
yourContainerWithGridLayout.add(cellPanel);
........
}
Where
yourContainerWithGridLayout is the container that has the GridLayout. I don't known now (to be honest I am only confused by all your posted code ....) what is your container with the GridLayout. You must to know, at least, this.