Skip to content

Commit 30b3590

Browse files
final code
1 parent 87512c9 commit 30b3590

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

Assignment/Registration_form

+27-3
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ assignment2 extends Application {
152152
gen.setSpacing(15);
153153

154154
ToggleGroup toggleGroup=new ToggleGroup();
155+
155156
//male
156157
RadioButton but1=new RadioButton("Male");
157158
but1.setToggleGroup(toggleGroup);
158-
but1.setSelected(true);
159159
gen.getChildren().add(but1);
160160
but1.setStyle("-fx-text-fill:white");
161161
//female
@@ -177,7 +177,7 @@ assignment2 extends Application {
177177
lan.setSpacing(15);
178178
//hindi
179179
CheckBox but3=new CheckBox("Hindi");
180-
but3.setSelected(true);
180+
181181
lan.getChildren().add(but3);
182182
but3.setStyle("-fx-text-fill:white");
183183

@@ -308,7 +308,31 @@ assignment2 extends Application {
308308
alert.alert_b("error","enter the year");
309309
}
310310

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)) {
312336
window.setScene(scene1);
313337
}
314338
});

0 commit comments

Comments
 (0)