473,321 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

Questions about Swing components and Native method.

35
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
May 20 '08 #1
1 1320
samido
52
Sam Rabophala, let me ask you first, what version of Java do you use...?
Jun 9 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Hal Vaughan | last post by:
I have a panel in a GUI that has three components: A JTextArea, a JCheckBox and a JButton. When the button is pressed, I want to check the value of the checkbox and get the text of the textarea...
5
by: Chris | last post by:
Having been traumatised many years ago when using MFC/C++ to develop front-end code, I've religiously avoided GUI work since and stuck to back-end / server-side projects. So I'm a bit of a novice...
6
by: Joseph | last post by:
hi 1) i plan on having an awt canvas component (to draw graphs) on a JFrame with other swing components..will this be okay? i've read that swing and awt aren't compatible.. 2)Also, if i...
2
by: Leo P. | last post by:
I haven't used Swing too much, but I've recently run into a problem that I'm not sure how to fix. When I remove all components from a JPanel and then add new components to it, the panel displays...
3
by: bergel | last post by:
Hello, Does anyone already have some experience in mixing AWT and Swing? Is it conceptually doable? Does the design of Swing prevent interaction between an AWT and a Swing widget? Regards,...
0
by: Ney André de Mello Zunino | last post by:
Hello. I have decided to look again at Java after a *really* long break. While browsing through the Swing tutorials , I noticed that the basic skeleton of the demo applications had something...
8
by: Beatrice Rutger | last post by:
Hi, I am a previous Micro$oft desertee (moved from VB/VC++ to Java before this whole DOTNET thing) because I had several issues with Micro$oft. I am not completely in love with Windoze, but I...
19
by: MP | last post by:
I'm interested to learn how to use mdb files via ado/adox via vb6 Since I'm not using Access are those types of questions o.t. here? I see very few ado questions here. But there's a lot more...
6
by: r035198x | last post by:
I have put together this article to give people starting Swing an awareness of issues that need to be considered when creating a Swing application. Most of the Swing tutorials that I have seen just...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.