Skip to content

Commit e003151

Browse files
Fixed Bug where if there are only a few flashcards in a set, the UI looked weird.
1 parent 5b0d6f5 commit e003151

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/frameworks_and_drivers/components/ListOfFlashcardsDataPanel.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public ListOfFlashcardsDataPanel(DBGateway dbGateway, List<FlashcardDsRequestMod
5757
refresh.addActionListener(this);
5858

5959
this.add(buttons);
60+
this.setMaximumSize(new Dimension(1000, 100));
6061

6162
//If there are no flashcards we show a label that states that there are no flashcards.
6263
//If there are flashcards we show the flashcard information with a FlashcardDataPanel object.
@@ -90,7 +91,10 @@ else if (size % 3 == 0){
9091
}
9192

9293
//This panel customization
93-
this.add(flashcardPanels);
94+
JPanel panel = new JPanel();
95+
panel.add(flashcardPanels);
96+
panel.setLayout(new FlowLayout());
97+
this.add(panel);
9498
this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));
9599
this.setBorder(new EmptyBorder(10, 10, 10, 10));
96100
this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);

0 commit comments

Comments
 (0)