-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCurrencyConverter.java
More file actions
3039 lines (2560 loc) · 97.6 KB
/
CurrencyConverter.java
File metadata and controls
3039 lines (2560 loc) · 97.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.MenuBar;
import javafx.scene.control.Menu;
import javafx.scene.control.MenuItem;
import javafx.scene.control.RadioButton;
import javafx.scene.control.TextField;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.layout.CornerRadii;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.stage.Stage;
/**
* Kilometer Converter version 2 application
* Harrison Holsinger
* 3/15/2021
*/
public class CurrencyConverter extends Application
{
// Fields
private TextField TextField1, TextField2, TextField3, TextField4, TextField5, TextField6, TextField7, TextField8, TextField9,
TextField10, TextField11, TextField12, TextField13, TextField14, TextField15;
private Label resultLabel1, resultLabel2, resultLabel3, resultLabel4, resultLabel5, resultLabel6, resultLabel7, resultLabel8,
resultLabel9, resultLabel10, resultLabel11, resultLabel12, resultLabel13, resultLabel14, resultLabel15, resultLabel16,
resultLabel17, resultLabel18, resultLabel19, resultLabel20, resultLabel21, resultLabel22, resultLabel23, resultLabel24,
resultLabel25, resultLabel26, resultLabel27, resultLabel28, resultLabel29, resultLabel30;
private Label catchLabel1, catchLabel2, catchLabel3, catchLabel4, catchLabel5, catchLabel6, catchLabel7, catchLabel8,
catchLabel9, catchLabel10, catchLabel11, catchLabel12, catchLabel13, catchLabel14, catchLabel15, catchLabel16,
catchLabel17, catchLabel18, catchLabel19, catchLabel20, catchLabel21, catchLabel22, catchLabel23, catchLabel24,
catchLabel25, catchLabel26, catchLabel27, catchLabel28, catchLabel29, catchLabel30;;
public static void main(String[] args)
{
// Launch the application.
launch(args);
}
@Override
public void start(Stage primaryStage)
{
// Labels
// SCENE 1
Label Title = new Label("CURRENCY CONVERTER");
Title.setStyle("-fx-font-weight: bold");
Title.setStyle("-fx-font: 40 arial;");
Title.setTextFill(Color.BLACK);
Label Title1 = new Label("CHOOSE THE CURRENCIES TO CONVERT:");
Title1.setStyle("-fx-font-weight: bold");
Title1.setStyle("-fx-font: 20 arial;");
Title1.setTextFill(Color.BLACK);
Label name = new Label("Harrison Holsinger");
name.setStyle("-fx-font-weight: bold");
name.setStyle("-fx-font: 16 arial;");
name.setTextFill(Color.BLACK);
// SCENE 2
Label header1 = new Label("United States Dollar <--> Canadian Dollar");
header1.setStyle("-fx-font-weight: bold");
header1.setStyle("-fx-font: 16 arial;");
header1.setTextFill(Color.BLACK);
Label instruc1 = new Label("Enter the amount you want converted:");
instruc1.setStyle("-fx-font-weight: bold");
instruc1.setStyle("-fx-font: 16 arial;");
instruc1.setTextFill(Color.BLACK);
// SCENE 3
Label header2 = new Label("United States Dollar <--> Euro");
header2.setStyle("-fx-font-weight: bold");
header2.setStyle("-fx-font: 16 arial;");
header2.setTextFill(Color.BLACK);
Label instruc2 = new Label("Enter the amount you want converted:");
instruc2.setStyle("-fx-font-weight: bold");
instruc2.setStyle("-fx-font: 16 arial;");
instruc2.setTextFill(Color.BLACK);
// SCENE 4
Label header3 = new Label("United States Dollar <--> Pound");
header3.setStyle("-fx-font-weight: bold");
header3.setStyle("-fx-font: 16 arial;");
header3.setTextFill(Color.BLACK);
Label instruc3 = new Label("Enter the amount you want converted:");
instruc3.setStyle("-fx-font-weight: bold");
instruc3.setStyle("-fx-font: 16 arial;");
instruc3.setTextFill(Color.BLACK);
// SCENE 5
Label header4 = new Label("United States Dollar <--> Australian Dollar");
header4.setStyle("-fx-font-weight: bold");
header4.setStyle("-fx-font: 16 arial;");
header4.setTextFill(Color.BLACK);
Label instruc4 = new Label("Enter the amount you want converted:");
instruc4.setStyle("-fx-font-weight: bold");
instruc4.setStyle("-fx-font: 16 arial;");
instruc4.setTextFill(Color.BLACK);
// SCENE 6
Label header5 = new Label("United States Dollar <--> Peso");
header5.setStyle("-fx-font-weight: bold");
header5.setStyle("-fx-font: 16 arial;");
header5.setTextFill(Color.BLACK);
Label instruc5 = new Label("Enter the amount you want converted:");
instruc5.setStyle("-fx-font-weight: bold");
instruc5.setStyle("-fx-font: 16 arial;");
instruc5.setTextFill(Color.BLACK);
// SCENE 7
Label header6 = new Label("Canadian Dollar <--> Euro");
header6.setStyle("-fx-font-weight: bold");
header6.setStyle("-fx-font: 16 arial;");
header6.setTextFill(Color.BLACK);
Label instruc6 = new Label("Enter the amount you want converted:");
instruc6.setStyle("-fx-font-weight: bold");
instruc6.setStyle("-fx-font: 16 arial;");
instruc6.setTextFill(Color.BLACK);
// SCENE 8
Label header7 = new Label("Canadian Dollar <--> Pound");
header7.setStyle("-fx-font-weight: bold");
header7.setStyle("-fx-font: 16 arial;");
header7.setTextFill(Color.BLACK);
Label instruc7 = new Label("Enter the amount you want converted:");
instruc7.setStyle("-fx-font-weight: bold");
instruc7.setStyle("-fx-font: 16 arial;");
instruc7.setTextFill(Color.BLACK);
// SCENE 9
Label header8 = new Label("Canadian Dollar <--> Austrailian Dollar");
header8.setStyle("-fx-font-weight: bold");
header8.setStyle("-fx-font: 16 arial;");
header8.setTextFill(Color.BLACK);
Label instruc8 = new Label("Enter the amount you want converted:");
instruc8.setStyle("-fx-font-weight: bold");
instruc8.setStyle("-fx-font: 16 arial;");
instruc8.setTextFill(Color.BLACK);
// SCENE 10
Label header9 = new Label("Canadian Dollar <--> Peso");
header9.setStyle("-fx-font-weight: bold");
header9.setStyle("-fx-font: 16 arial;");
header9.setTextFill(Color.BLACK);
Label instruc9 = new Label("Enter the amount you want converted:");
instruc9.setStyle("-fx-font-weight: bold");
instruc9.setStyle("-fx-font: 16 arial;");
instruc9.setTextFill(Color.BLACK);
// SCENE 11
Label header10 = new Label("Euro <--> Pound");
header10.setStyle("-fx-font-weight: bold");
header10.setStyle("-fx-font: 16 arial;");
header10.setTextFill(Color.BLACK);
Label instruc10 = new Label("Enter the amount you want converted:");
instruc10.setStyle("-fx-font-weight: bold");
instruc10.setStyle("-fx-font: 16 arial;");
instruc10.setTextFill(Color.BLACK);
// SCENE 12
Label header11 = new Label("Euro <--> Australian Dollar");
header11.setStyle("-fx-font-weight: bold");
header11.setStyle("-fx-font: 16 arial;");
header11.setTextFill(Color.BLACK);
Label instruc11 = new Label("Enter the amount you want converted:");
instruc11.setStyle("-fx-font-weight: bold");
instruc11.setStyle("-fx-font: 16 arial;");
instruc11.setTextFill(Color.BLACK);
// SCENE 13
Label header12 = new Label("Euro <--> Peso");
header12.setStyle("-fx-font-weight: bold");
header12.setStyle("-fx-font: 16 arial;");
header12.setTextFill(Color.BLACK);
Label instruc12 = new Label("Enter the amount you want converted:");
instruc12.setStyle("-fx-font-weight: bold");
instruc12.setStyle("-fx-font: 16 arial;");
instruc12.setTextFill(Color.BLACK);
// SCENE 14
Label header13 = new Label("Pound <--> Australian Dollar");
header13.setStyle("-fx-font-weight: bold");
header13.setStyle("-fx-font: 16 arial;");
header13.setTextFill(Color.BLACK);
Label instruc13 = new Label("Enter the amount you want converted:");
instruc13.setStyle("-fx-font-weight: bold");
instruc13.setStyle("-fx-font: 16 arial;");
instruc13.setTextFill(Color.BLACK);
// SCENE 15
Label header14 = new Label("Pound <--> Peso");
header14.setStyle("-fx-font-weight: bold");
header14.setStyle("-fx-font: 16 arial;");
header14.setTextFill(Color.BLACK);
Label instruc14 = new Label("Enter the amount you want converted:");
instruc14.setStyle("-fx-font-weight: bold");
instruc14.setStyle("-fx-font: 16 arial;");
instruc14.setTextFill(Color.BLACK);
// SCENE 16
Label header15 = new Label("Australian Dollar <--> Peso");
header15.setStyle("-fx-font-weight: bold");
header15.setStyle("-fx-font: 16 arial;");
header15.setTextFill(Color.BLACK);
Label instruc15 = new Label("Enter the amount you want converted:");
instruc15.setStyle("-fx-font-weight: bold");
instruc15.setStyle("-fx-font: 16 arial;");
instruc15.setTextFill(Color.BLACK);
// Buttons
// SCENE 1
RadioButton USDtoCAD = new RadioButton("USD <--> CAD");
USDtoCAD.setStyle("-fx-font-weight: bold");
USDtoCAD.setStyle("-fx-font: 16 arial;");
USDtoCAD.setTextFill(Color.BLACK);
RadioButton USDtoEUR = new RadioButton("USD <--> EURO");
USDtoEUR.setStyle("-fx-font-weight: bold");
USDtoEUR.setStyle("-fx-font: 16 arial;");
USDtoEUR.setTextFill(Color.BLACK);
RadioButton USDtoGBP = new RadioButton("USD <--> POUND");
USDtoGBP.setStyle("-fx-font-weight: bold");
USDtoGBP.setStyle("-fx-font: 16 arial;");
USDtoGBP.setTextFill(Color.BLACK);
RadioButton USDtoAUD = new RadioButton("USD <--> AUD");
USDtoAUD.setStyle("-fx-font-weight: bold");
USDtoAUD.setStyle("-fx-font: 16 arial;");
USDtoAUD.setTextFill(Color.BLACK);
RadioButton USDtoPESO = new RadioButton("USD <--> PESO");
USDtoPESO.setStyle("-fx-font-weight: bold");
USDtoPESO.setStyle("-fx-font: 16 arial;");
USDtoPESO.setTextFill(Color.BLACK);
RadioButton CADtoEUR = new RadioButton("CAD <--> EURO");
CADtoEUR.setStyle("-fx-font-weight: bold");
CADtoEUR.setStyle("-fx-font: 16 arial;");
CADtoEUR.setTextFill(Color.BLACK);
RadioButton CADtoGBP = new RadioButton("CAD <--> GBP");
CADtoGBP.setStyle("-fx-font-weight: bold");
CADtoGBP.setStyle("-fx-font: 16 arial;");
CADtoGBP.setTextFill(Color.BLACK);
RadioButton CADtoAUD = new RadioButton("CAD <--> AUD");
CADtoAUD.setStyle("-fx-font-weight: bold");
CADtoAUD.setStyle("-fx-font: 16 arial;");
CADtoAUD.setTextFill(Color.BLACK);
RadioButton CADtoPESO = new RadioButton("CAD <--> PESO");
CADtoPESO.setStyle("-fx-font-weight: bold");
CADtoPESO.setStyle("-fx-font: 16 arial;");
CADtoPESO.setTextFill(Color.BLACK);
RadioButton EURtoGBP = new RadioButton("EUR <--> GBP");
EURtoGBP.setStyle("-fx-font-weight: bold");
EURtoGBP.setStyle("-fx-font: 16 arial;");
EURtoGBP.setTextFill(Color.BLACK);
RadioButton EURtoAUD = new RadioButton("EUR <--> AUD");
EURtoAUD.setStyle("-fx-font-weight: bold");
EURtoAUD.setStyle("-fx-font: 16 arial;");
EURtoAUD.setTextFill(Color.BLACK);
RadioButton EURtoPESO = new RadioButton("EUR <--> PESO");
EURtoPESO.setStyle("-fx-font-weight: bold");
EURtoPESO.setStyle("-fx-font: 16 arial;");
EURtoPESO.setTextFill(Color.BLACK);
RadioButton GBPtoAUD = new RadioButton("GBP <--> AUD");
GBPtoAUD.setStyle("-fx-font-weight: bold");
GBPtoAUD.setStyle("-fx-font: 16 arial;");
GBPtoAUD.setTextFill(Color.BLACK);
RadioButton GBPtoPESO = new RadioButton("GBP <--> PESO");
GBPtoPESO.setStyle("-fx-font-weight: bold");
GBPtoPESO.setStyle("-fx-font: 16 arial;");
GBPtoPESO.setTextFill(Color.BLACK);
RadioButton AUDtoPESO = new RadioButton("AUD <--> PESO");
AUDtoPESO.setStyle("-fx-font-weight: bold");
AUDtoPESO.setStyle("-fx-font: 16 arial;");
AUDtoPESO.setTextFill(Color.BLACK);
// SCENE 2
Button GoBackButton = new Button("GO BACK");
GoBackButton.setStyle("-fx-font-weight: bold");
GoBackButton.setStyle("-fx-font: 16 arial;");
GoBackButton.setTextFill(Color.BLACK);
Button calcButton = new Button("CONVERT USD to CAD");
calcButton.setStyle("-fx-font-weight: bold");
calcButton.setStyle("-fx-font: 16 arial;");
calcButton.setTextFill(Color.BLACK);
Button calcButton1 = new Button("CONVERT CAD to USD");
calcButton1.setStyle("-fx-font-weight: bold");
calcButton1.setStyle("-fx-font: 16 arial;");
calcButton1.setTextFill(Color.BLACK);
Button reset1 = new Button("RESET");
reset1.setStyle("-fx-font-weight: bold");
reset1.setStyle("-fx-font: 16 arial;");
reset1.setTextFill(Color.BLACK);
Button bye = new Button("EXIT");
bye.setStyle("-fx-font-weight: bold");
bye.setStyle("-fx-font: 16 arial;");
bye.setTextFill(Color.BLACK);
// SCENE 3
Button GoBackButton2 = new Button("GO BACK");
GoBackButton2.setStyle("-fx-font-weight: bold");
GoBackButton2.setStyle("-fx-font: 16 arial;");
GoBackButton2.setTextFill(Color.BLACK);
Button calcButton3 = new Button("CONVERT USD to EUR");
calcButton3.setStyle("-fx-font-weight: bold");
calcButton3.setStyle("-fx-font: 16 arial;");
calcButton3.setTextFill(Color.BLACK);
Button calcButton4 = new Button("CONVERT EUR to USD");
calcButton4.setStyle("-fx-font-weight: bold");
calcButton4.setStyle("-fx-font: 16 arial;");
calcButton4.setTextFill(Color.BLACK);
Button reset2 = new Button("RESET");
reset2.setStyle("-fx-font-weight: bold");
reset2.setStyle("-fx-font: 16 arial;");
reset2.setTextFill(Color.BLACK);
Button bye2 = new Button("EXIT");
bye2.setStyle("-fx-font-weight: bold");
bye2.setStyle("-fx-font: 16 arial;");
bye2.setTextFill(Color.BLACK);
// SCENE 4
Button GoBackButton3 = new Button("GO BACK");
GoBackButton3.setStyle("-fx-font-weight: bold");
GoBackButton3.setStyle("-fx-font: 16 arial;");
GoBackButton3.setTextFill(Color.BLACK);
Button calcButton5 = new Button("CONVERT USD to GBP");
calcButton5.setStyle("-fx-font-weight: bold");
calcButton5.setStyle("-fx-font: 16 arial;");
calcButton5.setTextFill(Color.BLACK);
Button calcButton6 = new Button("CONVERT GBP to USD");
calcButton6.setStyle("-fx-font-weight: bold");
calcButton6.setStyle("-fx-font: 16 arial;");
calcButton6.setTextFill(Color.BLACK);
Button reset3 = new Button("RESET");
reset3.setStyle("-fx-font-weight: bold");
reset3.setStyle("-fx-font: 16 arial;");
reset3.setTextFill(Color.BLACK);
Button bye3 = new Button("EXIT");
bye3.setStyle("-fx-font-weight: bold");
bye3.setStyle("-fx-font: 16 arial;");
bye3.setTextFill(Color.BLACK);
// SCENE 5
Button GoBackButton4 = new Button("GO BACK");
GoBackButton4.setStyle("-fx-font-weight: bold");
GoBackButton4.setStyle("-fx-font: 16 arial;");
GoBackButton4.setTextFill(Color.BLACK);
Button calcButton7 = new Button("CONVERT USD to AUD");
calcButton7.setStyle("-fx-font-weight: bold");
calcButton7.setStyle("-fx-font: 16 arial;");
calcButton7.setTextFill(Color.BLACK);
Button calcButton8 = new Button("CONVERT AUD to USD");
calcButton8.setStyle("-fx-font-weight: bold");
calcButton8.setStyle("-fx-font: 16 arial;");
calcButton8.setTextFill(Color.BLACK);
Button reset4 = new Button("RESET");
reset1.setStyle("-fx-font-weight: bold");
reset1.setStyle("-fx-font: 16 arial;");
reset1.setTextFill(Color.BLACK);
Button bye4 = new Button("EXIT");
bye4.setStyle("-fx-font-weight: bold");
bye4.setStyle("-fx-font: 16 arial;");
bye4.setTextFill(Color.BLACK);
// SCENE 6
Button GoBackButton5 = new Button("GO BACK");
GoBackButton5.setStyle("-fx-font-weight: bold");
GoBackButton5.setStyle("-fx-font: 16 arial;");
GoBackButton5.setTextFill(Color.BLACK);
Button calcButton9 = new Button("CONVERT USD to PESO");
calcButton9.setStyle("-fx-font-weight: bold");
calcButton9.setStyle("-fx-font: 16 arial;");
calcButton9.setTextFill(Color.BLACK);
Button calcButton10 = new Button("CONVERT PESO to USD");
calcButton10.setStyle("-fx-font-weight: bold");
calcButton10.setStyle("-fx-font: 16 arial;");
calcButton10.setTextFill(Color.BLACK);
Button reset5 = new Button("RESET");
reset5.setStyle("-fx-font-weight: bold");
reset5.setStyle("-fx-font: 16 arial;");
reset5.setTextFill(Color.BLACK);
Button bye5 = new Button("EXIT");
bye5.setStyle("-fx-font-weight: bold");
bye5.setStyle("-fx-font: 16 arial;");
bye5.setTextFill(Color.BLACK);
// SCENE 7
Button GoBackButton6 = new Button("GO BACK");
GoBackButton6.setStyle("-fx-font-weight: bold");
GoBackButton6.setStyle("-fx-font: 16 arial;");
GoBackButton6.setTextFill(Color.BLACK);
Button calcButton11 = new Button("CONVERT CAD to EUR");
calcButton11.setStyle("-fx-font-weight: bold");
calcButton11.setStyle("-fx-font: 16 arial;");
calcButton11.setTextFill(Color.BLACK);
Button calcButton12 = new Button("CONVERT EUR to CAD");
calcButton12.setStyle("-fx-font-weight: bold");
calcButton12.setStyle("-fx-font: 16 arial;");
calcButton12.setTextFill(Color.BLACK);
Button reset6 = new Button("RESET");
reset6.setStyle("-fx-font-weight: bold");
reset6.setStyle("-fx-font: 16 arial;");
reset6.setTextFill(Color.BLACK);
Button bye6 = new Button("EXIT");
bye6.setStyle("-fx-font-weight: bold");
bye6.setStyle("-fx-font: 16 arial;");
bye6.setTextFill(Color.BLACK);
// SCENE 8
Button GoBackButton7 = new Button("GO BACK");
GoBackButton7.setStyle("-fx-font-weight: bold");
GoBackButton7.setStyle("-fx-font: 16 arial;");
GoBackButton7.setTextFill(Color.BLACK);
Button calcButton13 = new Button("CONVERT CAD to GBP");
calcButton13.setStyle("-fx-font-weight: bold");
calcButton13.setStyle("-fx-font: 16 arial;");
calcButton13.setTextFill(Color.BLACK);
Button calcButton14 = new Button("CONVERT GBP to CAD");
calcButton14.setStyle("-fx-font-weight: bold");
calcButton14.setStyle("-fx-font: 16 arial;");
calcButton14.setTextFill(Color.BLACK);
Button reset7 = new Button("RESET");
reset7.setStyle("-fx-font-weight: bold");
reset7.setStyle("-fx-font: 16 arial;");
reset7.setTextFill(Color.BLACK);
Button bye7 = new Button("EXIT");
bye7.setStyle("-fx-font-weight: bold");
bye7.setStyle("-fx-font: 16 arial;");
bye7.setTextFill(Color.BLACK);
// SCENE 9
Button GoBackButton8 = new Button("GO BACK");
GoBackButton8.setStyle("-fx-font-weight: bold");
GoBackButton8.setStyle("-fx-font: 16 arial;");
GoBackButton8.setTextFill(Color.BLACK);
Button calcButton15 = new Button("CONVERT CAD to AUD");
calcButton15.setStyle("-fx-font-weight: bold");
calcButton15.setStyle("-fx-font: 16 arial;");
calcButton15.setTextFill(Color.BLACK);
Button calcButton16 = new Button("CONVERT AUD to CAD");
calcButton16.setStyle("-fx-font-weight: bold");
calcButton16.setStyle("-fx-font: 16 arial;");
calcButton16.setTextFill(Color.BLACK);
Button reset8 = new Button("RESET");
reset8.setStyle("-fx-font-weight: bold");
reset8.setStyle("-fx-font: 16 arial;");
reset8.setTextFill(Color.BLACK);
Button bye8 = new Button("EXIT");
bye8.setStyle("-fx-font-weight: bold");
bye8.setStyle("-fx-font: 16 arial;");
bye8.setTextFill(Color.BLACK);
// SCENE 10
Button GoBackButton9 = new Button("GO BACK");
GoBackButton9.setStyle("-fx-font-weight: bold");
GoBackButton9.setStyle("-fx-font: 16 arial;");
GoBackButton9.setTextFill(Color.BLACK);
Button calcButton17 = new Button("CONVERT CAD to PESO");
calcButton17.setStyle("-fx-font-weight: bold");
calcButton17.setStyle("-fx-font: 16 arial;");
calcButton17.setTextFill(Color.BLACK);
Button calcButton18 = new Button("CONVERT PESO to CAD");
calcButton18.setStyle("-fx-font-weight: bold");
calcButton18.setStyle("-fx-font: 16 arial;");
calcButton18.setTextFill(Color.BLACK);
Button reset9 = new Button("RESET");
reset9.setStyle("-fx-font-weight: bold");
reset9.setStyle("-fx-font: 16 arial;");
reset9.setTextFill(Color.BLACK);
Button bye9 = new Button("EXIT");
bye9.setStyle("-fx-font-weight: bold");
bye9.setStyle("-fx-font: 16 arial;");
bye9.setTextFill(Color.BLACK);
// SCENE 11
Button GoBackButton10 = new Button("GO BACK");
GoBackButton10.setStyle("-fx-font-weight: bold");
GoBackButton10.setStyle("-fx-font: 16 arial;");
GoBackButton10.setTextFill(Color.BLACK);
Button calcButton19 = new Button("CONVERT EUR to GBP");
calcButton19.setStyle("-fx-font-weight: bold");
calcButton19.setStyle("-fx-font: 16 arial;");
calcButton19.setTextFill(Color.BLACK);
Button calcButton20 = new Button("CONVERT GBP to EUR");
calcButton20.setStyle("-fx-font-weight: bold");
calcButton20.setStyle("-fx-font: 16 arial;");
calcButton20.setTextFill(Color.BLACK);
Button reset10 = new Button("RESET");
reset10.setStyle("-fx-font-weight: bold");
reset10.setStyle("-fx-font: 16 arial;");
reset10.setTextFill(Color.BLACK);
Button bye10 = new Button("EXIT");
bye10.setStyle("-fx-font-weight: bold");
bye10.setStyle("-fx-font: 16 arial;");
bye10.setTextFill(Color.BLACK);
// SCENE 12
Button GoBackButton11 = new Button("GO BACK");
GoBackButton11.setStyle("-fx-font-weight: bold");
GoBackButton11.setStyle("-fx-font: 16 arial;");
GoBackButton11.setTextFill(Color.BLACK);
Button calcButton21 = new Button("CONVERT EUR to AUD");
calcButton21.setStyle("-fx-font-weight: bold");
calcButton21.setStyle("-fx-font: 16 arial;");
calcButton21.setTextFill(Color.BLACK);
Button calcButton22 = new Button("CONVERT AUD to EUR");
calcButton22.setStyle("-fx-font-weight: bold");
calcButton22.setStyle("-fx-font: 16 arial;");
calcButton22.setTextFill(Color.BLACK);
Button reset11 = new Button("RESET");
reset11.setStyle("-fx-font-weight: bold");
reset11.setStyle("-fx-font: 16 arial;");
reset11.setTextFill(Color.BLACK);
Button bye11 = new Button("EXIT");
bye11.setStyle("-fx-font-weight: bold");
bye11.setStyle("-fx-font: 16 arial;");
bye11.setTextFill(Color.BLACK);
// SCENE 13
Button GoBackButton12 = new Button("GO BACK");
GoBackButton12.setStyle("-fx-font-weight: bold");
GoBackButton12.setStyle("-fx-font: 16 arial;");
GoBackButton12.setTextFill(Color.BLACK);
Button calcButton23 = new Button("CONVERT EUR to PESO");
calcButton23.setStyle("-fx-font-weight: bold");
calcButton23.setStyle("-fx-font: 16 arial;");
calcButton23.setTextFill(Color.BLACK);
Button calcButton24 = new Button("CONVERT PESO to EUR");
calcButton24.setStyle("-fx-font-weight: bold");
calcButton24.setStyle("-fx-font: 16 arial;");
calcButton24.setTextFill(Color.BLACK);
Button reset12 = new Button("RESET");
reset12.setStyle("-fx-font-weight: bold");
reset12.setStyle("-fx-font: 16 arial;");
reset12.setTextFill(Color.BLACK);
Button bye12 = new Button("EXIT");
bye12.setStyle("-fx-font-weight: bold");
bye12.setStyle("-fx-font: 16 arial;");
bye12.setTextFill(Color.BLACK);
// SCENE 14
Button GoBackButton13 = new Button("GO BACK");
GoBackButton13.setStyle("-fx-font-weight: bold");
GoBackButton13.setStyle("-fx-font: 16 arial;");
GoBackButton13.setTextFill(Color.BLACK);
Button calcButton25 = new Button("CONVERT GBP to AUD");
calcButton25.setStyle("-fx-font-weight: bold");
calcButton25.setStyle("-fx-font: 16 arial;");
calcButton25.setTextFill(Color.BLACK);
Button calcButton26 = new Button("CONVERT AUD to GBP");
calcButton26.setStyle("-fx-font-weight: bold");
calcButton26.setStyle("-fx-font: 16 arial;");
calcButton26.setTextFill(Color.BLACK);
Button reset13 = new Button("RESET");
reset13.setStyle("-fx-font-weight: bold");
reset13.setStyle("-fx-font: 16 arial;");
reset13.setTextFill(Color.BLACK);
Button bye13 = new Button("EXIT");
bye13.setStyle("-fx-font-weight: bold");
bye13.setStyle("-fx-font: 16 arial;");
bye13.setTextFill(Color.BLACK);
// SCENE 15
Button GoBackButton14 = new Button("GO BACK");
GoBackButton14.setStyle("-fx-font-weight: bold");
GoBackButton14.setStyle("-fx-font: 16 arial;");
GoBackButton14.setTextFill(Color.BLACK);
Button calcButton27 = new Button("CONVERT GBP to PESO");
calcButton27.setStyle("-fx-font-weight: bold");
calcButton27.setStyle("-fx-font: 16 arial;");
calcButton27.setTextFill(Color.BLACK);
Button calcButton28 = new Button("CONVERT PESO to GBP");
calcButton28.setStyle("-fx-font-weight: bold");
calcButton28.setStyle("-fx-font: 16 arial;");
calcButton28.setTextFill(Color.BLACK);
Button reset14 = new Button("RESET");
reset14.setStyle("-fx-font-weight: bold");
reset14.setStyle("-fx-font: 16 arial;");
reset14.setTextFill(Color.BLACK);
Button bye14 = new Button("EXIT");
bye14.setStyle("-fx-font-weight: bold");
bye14.setStyle("-fx-font: 16 arial;");
bye14.setTextFill(Color.BLACK);
// SCENE 16
Button GoBackButton15 = new Button("GO BACK");
GoBackButton15.setStyle("-fx-font-weight: bold");
GoBackButton15.setStyle("-fx-font: 16 arial;");
GoBackButton15.setTextFill(Color.BLACK);
Button calcButton29 = new Button("CONVERT AUD to PESO");
calcButton29.setStyle("-fx-font-weight: bold");
calcButton29.setStyle("-fx-font: 16 arial;");
calcButton29.setTextFill(Color.BLACK);
Button calcButton30 = new Button("CONVERT PESO to AUD");
calcButton30.setStyle("-fx-font-weight: bold");
calcButton30.setStyle("-fx-font: 16 arial;");
calcButton30.setTextFill(Color.BLACK);
Button reset15 = new Button("RESET");
reset15.setStyle("-fx-font-weight: bold");
reset15.setStyle("-fx-font: 16 arial;");
reset15.setTextFill(Color.BLACK);
Button bye15 = new Button("EXIT");
bye15.setStyle("-fx-font-weight: bold");
bye15.setStyle("-fx-font: 16 arial;");
bye15.setTextFill(Color.BLACK);
// SCENE 1
// Hbox and Vbox
HBox title = new HBox(15, Title1);
GridPane Button = new GridPane();
Button.setVgap(10);
Button.add(USDtoCAD, 0, 0);
Button.add(USDtoEUR, 0, 1);
Button.add(USDtoGBP, 0, 2);
Button.add(USDtoAUD, 0, 3);
Button.add(USDtoPESO, 0, 4);
Button.add(CADtoEUR, 0, 5);
Button.add(CADtoGBP, 0, 6);
Button.add(CADtoAUD, 0, 7);
Button.add(CADtoPESO, 1, 0);
Button.add(EURtoGBP, 1, 1);
Button.add(EURtoAUD, 1, 2);
Button.add(EURtoPESO, 1, 3);
Button.add(GBPtoAUD, 1, 4);
Button.add(GBPtoPESO, 1, 5);
Button.add(AUDtoPESO, 1, 6);
Label menuLabel = new Label("");
menuLabel.setTextFill(Color.BLACK);
// Create the menu bar.
MenuBar menuBar = new MenuBar();
// Create the File menu.
Menu fileMenu = new Menu("File");
fileMenu.setGraphic(menuLabel);
MenuItem exitItem = new MenuItem("Exit");
fileMenu.getItems().add(exitItem);
// Register an event handler for the exit item.
exitItem.setOnAction(event ->
{
primaryStage.close();
});
// Add the File menu to the menu bar.
menuBar.getMenus().addAll(fileMenu);
menuBar.setTranslateX(0);
menuBar.setTranslateY(0);
// create a background fill
BackgroundFill background_fill = new BackgroundFill(Color.WHITE, CornerRadii.EMPTY, Insets.EMPTY);
// create Background
Background background = new Background(background_fill);
VBox vBox1 = new VBox(20, menuBar, Title, Title1, Button, name);
// set background
vBox1.setBackground(background);
// Adjustments
title.setAlignment(Pos.CENTER);
vBox1.setAlignment(Pos.CENTER);
Button.setAlignment(Pos.CENTER);
vBox1.setPadding(new Insets(15));
Button.setPadding(new Insets(10));
title.setPadding(new Insets(10));
// SCENE 2
TextField1 = new TextField();
resultLabel1 = new Label();
resultLabel1.setStyle("-fx-font-weight: bold");
resultLabel1.setStyle("-fx-font: 16 arial;");
resultLabel1.setTextFill(Color.BLACK);
resultLabel2 = new Label();
resultLabel2.setStyle("-fx-font-weight: bold");
resultLabel2.setStyle("-fx-font: 16 arial;");
resultLabel2.setTextFill(Color.BLACK);
// Catch Labels
catchLabel1 = new Label();
catchLabel1.setStyle("-fx-font-weight: bold");
catchLabel1.setStyle("-fx-font: 16 arial;");
catchLabel1.setTextFill(Color.BLACK);
catchLabel2 = new Label();
catchLabel2.setStyle("-fx-font-weight: bold");
catchLabel2.setStyle("-fx-font: 16 arial;");
catchLabel2.setTextFill(Color.BLACK);
GridPane gridpane1 = new GridPane();
gridpane1.setHgap(10);
gridpane1.setVgap(10);
gridpane1.add(instruc1, 1, 1);
gridpane1.add(header1, 1, 0);
gridpane1.add(TextField1, 1, 2);
gridpane1.add(reset1, 2, 2);
gridpane1.add(catchLabel1, 1, 3);
gridpane1.add(catchLabel2, 1, 3);
gridpane1.add(resultLabel1, 1, 6);
gridpane1.add(resultLabel2, 1, 6);
gridpane1.setAlignment(Pos.CENTER);
gridpane1.setPadding(new Insets(10));
// Vbox
VBox result = new VBox(15, gridpane1, calcButton, calcButton1, GoBackButton, bye);
result.setBackground(background);
// Set the result VBox's alignment to center.
result.setAlignment(Pos.CENTER);
// Set the result VBox's padding to 10 pixels.
result.setPadding(new Insets(10));
// SCENE 3
TextField2 = new TextField();
resultLabel3 = new Label();
resultLabel3.setStyle("-fx-font-weight: bold");
resultLabel3.setStyle("-fx-font: 16 arial;");
resultLabel3.setTextFill(Color.BLACK);
resultLabel4 = new Label();
resultLabel4.setStyle("-fx-font-weight: bold");
resultLabel4.setStyle("-fx-font: 16 arial;");
resultLabel4.setTextFill(Color.BLACK);
// Catch Labels
catchLabel3 = new Label();
catchLabel3.setStyle("-fx-font-weight: bold");
catchLabel3.setStyle("-fx-font: 16 arial;");
catchLabel3.setTextFill(Color.BLACK);
catchLabel4 = new Label();
catchLabel4.setStyle("-fx-font-weight: bold");
catchLabel4.setStyle("-fx-font: 16 arial;");
catchLabel4.setTextFill(Color.BLACK);
GridPane gridpane2 = new GridPane();
gridpane2.setHgap(10);
gridpane2.setVgap(10);
gridpane2.add(instruc2, 1, 1);
gridpane2.add(header2, 1, 0);
gridpane2.add(TextField2, 1, 2);
gridpane2.add(reset2, 2, 2);
gridpane2.add(catchLabel3, 1, 3);
gridpane2.add(catchLabel4, 1, 3);
gridpane2.add(resultLabel3, 1, 6);
gridpane2.add(resultLabel4, 1, 6);
gridpane2.setAlignment(Pos.CENTER);
gridpane2.setPadding(new Insets(10));
// Vbox
VBox result1 = new VBox(15, gridpane2, calcButton3, calcButton4, GoBackButton2, bye2);
result1.setBackground(background);
// Set the result VBox's alignment to center.
result1.setAlignment(Pos.CENTER);
// Set the result VBox's padding to 10 pixels.
result1.setPadding(new Insets(10));
// SCENE 4
TextField3 = new TextField();
resultLabel5 = new Label();
resultLabel5.setStyle("-fx-font-weight: bold");
resultLabel5.setStyle("-fx-font: 16 arial;");
resultLabel5.setTextFill(Color.BLACK);
resultLabel6 = new Label();
resultLabel6.setStyle("-fx-font-weight: bold");
resultLabel6.setStyle("-fx-font: 16 arial;");
resultLabel6.setTextFill(Color.BLACK);
// Catch Labels
catchLabel5 = new Label();
catchLabel5.setStyle("-fx-font-weight: bold");
catchLabel5.setStyle("-fx-font: 16 arial;");
catchLabel5.setTextFill(Color.BLACK);
catchLabel6 = new Label();
catchLabel6.setStyle("-fx-font-weight: bold");
catchLabel6.setStyle("-fx-font: 16 arial;");
catchLabel6.setTextFill(Color.BLACK);
GridPane gridpane3 = new GridPane();
gridpane3.setHgap(10);
gridpane3.setVgap(10);
gridpane3.add(instruc3, 1, 1);
gridpane3.add(header3, 1, 0);
gridpane3.add(TextField3, 1, 2);
gridpane3.add(reset3, 2, 2);
gridpane3.add(catchLabel5, 1, 3);
gridpane3.add(catchLabel6, 1, 3);
gridpane3.add(resultLabel5, 1, 6);
gridpane3.add(resultLabel6, 1, 6);
gridpane3.setAlignment(Pos.CENTER);
gridpane3.setPadding(new Insets(10));
// Vbox
VBox result2 = new VBox(15, gridpane3, calcButton5, calcButton6, GoBackButton3, bye3);
result2.setBackground(background);
// Set the result VBox's alignment to center.
result2.setAlignment(Pos.CENTER);
// Set the result VBox's padding to 10 pixels.
result2.setPadding(new Insets(10));
// SCENE 5
TextField4 = new TextField();
resultLabel7 = new Label();
resultLabel7.setStyle("-fx-font-weight: bold");
resultLabel7.setStyle("-fx-font: 16 arial;");
resultLabel7.setTextFill(Color.BLACK);
resultLabel8 = new Label();
resultLabel8.setStyle("-fx-font-weight: bold");
resultLabel8.setStyle("-fx-font: 16 arial;");
resultLabel8.setTextFill(Color.BLACK);
// Catch Labels
catchLabel7 = new Label();
catchLabel7.setStyle("-fx-font-weight: bold");
catchLabel7.setStyle("-fx-font: 16 arial;");
catchLabel7.setTextFill(Color.BLACK);
catchLabel8 = new Label();
catchLabel8.setStyle("-fx-font-weight: bold");
catchLabel8.setStyle("-fx-font: 16 arial;");
catchLabel8.setTextFill(Color.BLACK);
GridPane gridpane4 = new GridPane();
gridpane4.setHgap(10);
gridpane4.setVgap(10);
gridpane4.add(instruc4, 1, 1);
gridpane4.add(header4, 1, 0);
gridpane4.add(TextField4, 1, 2);
gridpane4.add(reset4, 2, 2);
gridpane4.add(catchLabel7, 1, 3);
gridpane4.add(catchLabel8, 1, 3);
gridpane4.add(resultLabel7, 1, 6);
gridpane4.add(resultLabel8, 1, 6);