[sword-cvs] r60 - trunk/app/src/org/crosswire/flashcards
Apache
apache at crosswire.org
Wed Sep 22 16:04:18 MST 2004
Author:
Date: 2004-09-22 16:04:18 -0700 (Wed, 22 Sep 2004)
New Revision: 60
Modified:
trunk/app/src/org/crosswire/flashcards/QuizPane.java
Log:
back to 3 columns
Modified: trunk/app/src/org/crosswire/flashcards/QuizPane.java
===================================================================
--- trunk/app/src/org/crosswire/flashcards/QuizPane.java 2004-09-22 19:30:45 UTC (rev 59)
+++ trunk/app/src/org/crosswire/flashcards/QuizPane.java 2004-09-22 23:04:18 UTC (rev 60)
@@ -48,6 +48,10 @@
*/
public class QuizPane extends JPanel
{
+ private static final int NUM_COLUMNS = 3;
+ // NUM_ANSWERS should be a multiple of NUM_COLUMNS.
+ private static final int NUM_ANSWERS = 9;
+
SetupPane setupPane;
Vector words = new Vector();
Vector notLearned = new Vector();
@@ -134,7 +138,7 @@
wCount.setBorder(BorderFactory.createEtchedBorder());
choicesPanel.setLayout(choicesPanelGridLayout);
- choicesPanelGridLayout.setColumns(1);
+ choicesPanelGridLayout.setColumns(NUM_COLUMNS);
choicesPanelGridLayout.setRows(0);
statusPanel.setLayout(statusPanelBorderLayout);
@@ -261,7 +265,7 @@
List picks = new ArrayList();
picks.add(createAnswerEntry(w.getSide(flipped)));
int size = words.size();
- while (picks.size() < Math.min(10, size))
+ while (picks.size() < Math.min(NUM_ANSWERS, size))
{
int c = (int) (Math.random() * choices.size());
WordEntry wc = (WordEntry) choices.get(c);
More information about the sword-cvs
mailing list