sort by goals
This commit is contained in:
@@ -280,8 +280,9 @@ public class HockeyStats {
|
||||
(2) Find Player
|
||||
(3) Sort By Name
|
||||
(4) Sort By Points
|
||||
(5) Show by Goals > num
|
||||
(6) Return to Main Menu
|
||||
(5) Sort By Goals
|
||||
(6) Show by Goals > num
|
||||
(7) Return to Main Menu
|
||||
|
||||
<---------------------------->
|
||||
""";
|
||||
@@ -327,6 +328,10 @@ public class HockeyStats {
|
||||
JOptionPane.showMessageDialog(null, "Sorted by points");
|
||||
break;
|
||||
case 5:
|
||||
players.sortByGoals();
|
||||
JOptionPane.showMessageDialog(null, "Sorted by goals");
|
||||
break;
|
||||
case 6:
|
||||
String minInput = JOptionPane.showInputDialog(null, "Enter the min goals to show:");
|
||||
if (minInput == null) {
|
||||
break;
|
||||
@@ -343,7 +348,7 @@ public class HockeyStats {
|
||||
JScrollPane showScrollPane = new JScrollPane(showTextArea);
|
||||
JOptionPane.showMessageDialog(null, showScrollPane);
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
statsExit = true;
|
||||
break;
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user