added scroll bar to viewer
This commit is contained in:
@@ -306,7 +306,11 @@ public class HockeyStats {
|
|||||||
try {
|
try {
|
||||||
switch (k) {
|
switch (k) {
|
||||||
case 1:
|
case 1:
|
||||||
JOptionPane.showMessageDialog(null, players.toString());
|
String printData = players.toString();
|
||||||
|
JTextArea printTextArea = new JTextArea(printData, 15, 60);
|
||||||
|
printTextArea.setEditable(false);
|
||||||
|
JScrollPane printScrollPane = new JScrollPane(printTextArea);
|
||||||
|
JOptionPane.showMessageDialog(null, printScrollPane);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
String findName =
|
String findName =
|
||||||
@@ -333,7 +337,11 @@ public class HockeyStats {
|
|||||||
}
|
}
|
||||||
int minGoals = Integer.parseInt(minInput);
|
int minGoals = Integer.parseInt(minInput);
|
||||||
PlayerList pl = players.getPlayersGoalsAbove(minGoals);
|
PlayerList pl = players.getPlayersGoalsAbove(minGoals);
|
||||||
JOptionPane.showMessageDialog(null, pl.toString());
|
String showData = pl.toString();
|
||||||
|
JTextArea showTextArea = new JTextArea(showData, 15, 60);
|
||||||
|
showTextArea.setEditable(false);
|
||||||
|
JScrollPane showScrollPane = new JScrollPane(showTextArea);
|
||||||
|
JOptionPane.showMessageDialog(null, showScrollPane);
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
statsExit = true;
|
statsExit = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user