aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMister Wrong <misterwrong@farnsworth.fritz.box>2020-03-18 17:21:35 +0100
committerMister Wrong <misterwrong@farnsworth.fritz.box>2020-03-18 17:21:35 +0100
commitd8631d023d73c4aa60cd7fa9e729bdecd35fe84a (patch)
treefcd6e74f502b3f536829326843cf223838359e48
parent1b5e0bcec17db397e1e93d87c90a116ad96b9a65 (diff)
downloadcalcusaurus-d8631d023d73c4aa60cd7fa9e729bdecd35fe84a.tar.gz
calcusaurus-d8631d023d73c4aa60cd7fa9e729bdecd35fe84a.tar.bz2
calcusaurus-d8631d023d73c4aa60cd7fa9e729bdecd35fe84a.zip
fix(ui):no negative number of execrises, and no more than 25.
-rw-r--r--src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.form7
-rw-r--r--src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.java5
2 files changed, 9 insertions, 3 deletions
diff --git a/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.form b/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.form
index 08d5432..7929000 100644
--- a/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.form
+++ b/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.form
@@ -1,6 +1,6 @@
1<?xml version="1.0" encoding="UTF-8" ?> 1<?xml version="1.0" encoding="UTF-8" ?>
2 2
3<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo"> 3<Form version="1.5" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JPanelFormInfo">
4 <AuxValues> 4 <AuxValues>
5 <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/> 5 <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
6 <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/> 6 <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
@@ -75,6 +75,11 @@
75 </Properties> 75 </Properties>
76 </Component> 76 </Component>
77 <Component class="javax.swing.JSpinner" name="amountSpinner"> 77 <Component class="javax.swing.JSpinner" name="amountSpinner">
78 <Properties>
79 <Property name="model" type="javax.swing.SpinnerModel" editor="org.netbeans.modules.form.editors2.SpinnerModelEditor">
80 <SpinnerModel initial="1" maximum="25" minimum="1" numberType="java.lang.Integer" stepSize="1" type="number"/>
81 </Property>
82 </Properties>
78 </Component> 83 </Component>
79 <Component class="javax.swing.JLabel" name="jLabel2"> 84 <Component class="javax.swing.JLabel" name="jLabel2">
80 <Properties> 85 <Properties>
diff --git a/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.java b/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.java
index adce7a8..6ae2c15 100644
--- a/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.java
+++ b/src/main/java/net/diederickdevries/calcusaurus/view/ExerciseTypePanel.java
@@ -91,8 +91,7 @@ public class ExerciseTypePanel extends javax.swing.JPanel
91 */ 91 */
92 @SuppressWarnings("unchecked") 92 @SuppressWarnings("unchecked")
93 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents 93 // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
94 private void initComponents() 94 private void initComponents() {
95 {
96 95
97 jLabel1 = new javax.swing.JLabel(); 96 jLabel1 = new javax.swing.JLabel();
98 amountSpinner = new javax.swing.JSpinner(); 97 amountSpinner = new javax.swing.JSpinner();
@@ -104,6 +103,8 @@ public class ExerciseTypePanel extends javax.swing.JPanel
104 103
105 jLabel1.setText("Hoeveel vragen wil je?"); 104 jLabel1.setText("Hoeveel vragen wil je?");
106 105
106 amountSpinner.setModel(new javax.swing.SpinnerNumberModel(1, 1, 25, 1));
107
107 jLabel2.setText("Hoogste getal?"); 108 jLabel2.setText("Hoogste getal?");
108 109
109 zeroCheckBox.setText("Nul (0)?"); 110 zeroCheckBox.setText("Nul (0)?");