I have implemented a console calculator application. It stores variables as well. Now I want to use the same parser in a java applet. I want to use the same Parser class but this time I want to get the inputs for variables via a dialog box. It should stop the execution of the program and asks for a user input in a popup box and when I enter the value, I want to use that value in the next line of the application.
instead of getting the value from bufferedreader, i want to do sthg like this
if someappletclasss.dialogresult = ok,
value = someappletclass.myvalue;
I’m new to java programming and any help would be greatly appreciated.
Use
JOptionPane#showInputDialog().See also: