fix icon rendering

buttonActions
dstuck 2025-06-17 16:47:36 +02:00
parent 96e5648833
commit a536482dbf
1 changed files with 1 additions and 5 deletions

View File

@ -303,6 +303,7 @@ public class SpielFrame extends JFrame {
// beginnen kann
}
buttons.get(i).setIcon(new ImageIcon("src/main/resources/" + (int) fen[j] + ".png"));
buttons.get(i).setDisabledIcon(new ImageIcon("src/main/resources/" + (int) fen[j] + ".png"));
i++;
@ -328,10 +329,6 @@ public class SpielFrame extends JFrame {
buttons.add(b);
}
for (int i = 0; i < buttons.size(); i++) {
buttons.get(i).setText(String.valueOf(i)); // Update button text to its index
}
}
private void setDefaultBackground() {
@ -408,7 +405,6 @@ public class SpielFrame extends JFrame {
}
// Add reversed buttons to the panel
for (JButton b : buttons) {
panelLinks.add(b);
}