I am learning java , I want to make one simple calculator program using GUI in Java. Idea is simple.
Calculator has 2 JTextField
for 1st number and for 2nd number.
When I run that program will show -- "Enter the First Number"
, below that JTextField
to enter 1st number , below that "Enter the Second Number"
, below that JTextField
to enter 2nd number.
My doubt/question is How to get those input from JTextField
and assign it to Scanner input1
and Scanner input2
? Is it possible to do that ? If not what are the alternative ways ?
Hope you will understand my question , if you are in-front of me I hope I will explain it more properly .