Hi all,
I am writing a Java GUI for my c like program. The GUI allows a user to select a txt file a time from local. The content of the file will be displayed in its respective textfield. The GUI is constructed as follow:
Top: a browse button, click to open a filechooser
Center: a radio button group of five. Each radio button follows by a textfield and a "clear" button. Once a radio button is focus, the file that is selected from file chooser will be displayed in its following textfield. When click on the following clear button, the content in this textfield will be cleaned up. For the last three radio buttons, they are set to be inactivated (invisable), until its previous textfield is filled in. For example, when the 2nd textfield is filled up, the 3rd radio button is activated. Now if one wants to select a file for the 3rd textfield, he needs to click on the 3rd radio button and open filechooser to select a file.
Bottom: a "RUN" button and an "EXIT" button. When the run button is click, the java program will check if all the activated textfield has content. If yes, link to my c like program, parsing those content in the textfields. After the calculation in the c like program, the result needs to be parsed back to java, display its calculation message and show its result in graphics.
My questions are written in bold above. I have read some articles online showing how to use JNI native methods to connect java gui and other languages programs. But I still don't see how to parse parameters between them.
A sample example or any suggestions will be appreciated!!!
Casy