@@ -152,10 +152,10 @@ assignment2 extends Application {
152
152
gen.setSpacing(15);
153
153
154
154
ToggleGroup toggleGroup=new ToggleGroup();
155
+
155
156
//male
156
157
RadioButton but1=new RadioButton("Male");
157
158
but1.setToggleGroup(toggleGroup);
158
- but1.setSelected(true);
159
159
gen.getChildren().add(but1);
160
160
but1.setStyle("-fx-text-fill:white");
161
161
//female
@@ -177,7 +177,7 @@ assignment2 extends Application {
177
177
lan.setSpacing(15);
178
178
//hindi
179
179
CheckBox but3=new CheckBox("Hindi");
180
- but3.setSelected(true);
180
+
181
181
lan.getChildren().add(but3);
182
182
but3.setStyle("-fx-text-fill:white");
183
183
@@ -308,7 +308,31 @@ assignment2 extends Application {
308
308
alert.alert_b("error","enter the year");
309
309
}
310
310
311
- if((!a)&&(!b)&&(!c)&&(!d)&&(mailchck)&&(!f)&&(mob)&&(!g)&&(!h)&&(!i)) {
311
+ boolean j=but1.isSelected();
312
+ boolean L=but2.isSelected();
313
+ boolean k=j|L;
314
+
315
+
316
+ if((!j)&&(!L))
317
+ {
318
+
319
+ alert.alert_b("error","enter the the gender portion");
320
+
321
+ } boolean m=but3.isSelected();
322
+ boolean n=but4.isSelected();
323
+ boolean o=but5.isSelected();
324
+ boolean p=m|n|o;
325
+
326
+
327
+
328
+ if((!m)&&(!n)&&(!o))
329
+ {
330
+
331
+ alert.alert_b("error","enter the the language");
332
+
333
+ }
334
+
335
+ if((!a)&&(!b)&&(!c)&&(!d)&&(mailchck)&&(!f)&&(mob)&&(!g)&&(!h)&&(!i)&&(k)&&(p)) {
312
336
window.setScene(scene1);
313
337
}
314
338
});
0 commit comments