Skip to content
This repository has been archived by the owner on Oct 29, 2021. It is now read-only.

Commit

Permalink
Fix progress bar getting stuck after 10 seconds of waiting
Browse files Browse the repository at this point in the history
  • Loading branch information
TheaMorin committed May 16, 2014
1 parent 5faaa09 commit 292e5f6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions schedule-generator/ca/uottawa/ui/ClientGUI.java
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,7 @@ private void createComponents() {
dimLoading.width = 260;
barLoading.setPreferredSize(dimLoading);

statusPanel.add(Box.createHorizontalStrut(10)); //space for the progress bar.
statusPanel.add(barLoading);
statusPanel.add(statusLabel);
statusPanel.add(btnCourseSequences);
Expand Down Expand Up @@ -899,13 +900,14 @@ public void displaySchedules(List<Schedule> schedules) {
} catch (InterruptedException e) {
e.printStackTrace();
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
barLoading.setValue(0);
}
});
barLoading.repaint();
}
SwingUtilities.invokeLater(new Runnable() {
public void run() {
barLoading.setValue(0);
}
});
barLoading.repaint();

currSchedules = schedules;
if (schedules.size() < 1) {
display("There are no possible schedules for your current selection.");
Expand Down

0 comments on commit 292e5f6

Please sign in to comment.