I want to load my food items int to a set of jbuttons. I have come this far
static JButton j;
jPanel3.setLayout(new GridLayout(3, 5, 3, 3));
jPanel3.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
for (int i = 0; i < 10; i++) {
j = new JButton();
j.setText(i + "");
jPanel3.add(j);
}
but i want to get individual source of the button. i only get the last button source. anybody know how do to this?