executing a program through GUI - Java
This is a discussion on executing a program through GUI - Java ; Hello Friends!
I have a program in Java that require three arguments from Command
line and executes.
I want to do this through a GUI developed using NetBeans.
I want to create Action of pressing Button after grabing the three
...
-
executing a program through GUI
Hello Friends!
I have a program in Java that require three arguments from Command
line and executes.
I want to do this through a GUI developed using NetBeans.
I want to create Action of pressing Button after grabing the three
arguments from three text fileds.
In out put as soon as I press ok button the program should execute.
can some one help me in this situation....PLEASE
-Anshul Saprey
-
Re: executing a program through GUI
anshul saprey wrote:
> Hello Friends!
> I have a program in Java that require three arguments from Command
> line and executes.
> I want to do this through a GUI developed using NetBeans.
>
> I want to create Action of pressing Button after grabing the three
> arguments from three text fileds.
>
>
> In out put as soon as I press ok button the program should execute.
>
>
> can some one help me in this situation....PLEASE
Unifying the threads - cross-posting for you so people won't be lost by the
multi-post.
--
Lew
-
Re: executing a program through GUI
anshul saprey <anshul_saprey@rediffmail.com> writes:
> Hello Friends!
> I have a program in Java that require three arguments from Command
> line and executes.
Well, if you have access to the source code of this program, you should
add an interface method that takes three parameters and then executes.
Modify the main method to read the command line arguments and then call
your new execution method.
> I want to do this through a GUI developed using NetBeans.
>
> I want to create Action of pressing Button after grabing the three
> arguments from three text fileds.
>
> In out put as soon as I press ok button the program should execute.
OK. Make the action of the button be to read the text field values and
invoke the execution method. Also, you should name the button something
other than "OK", since that is generally used in dialogs to confirm or
acknowledge a message. Choose something meaningful like "whatever the
program does" or at least the prosaic "Run Program".
If you don't have access to the source of the program that you want to
run, then you may need to create a String array of the parameters and
call the main method of the program you need to run. But it would be
cleaner if you could follow the initial advice above.
If you want to get really fancy, you could put appropriate listeners on
the text fields and only enable the "ok" button when each field has
something in it.
--
Thomas A. Russ, USC/Information Sciences Institute
Similar Threads
-
By Application Development in forum PHP
Replies: 2
Last Post: 09-28-2007, 06:29 PM
-
By Application Development in forum Java
Replies: 0
Last Post: 06-07-2007, 08:04 AM
-
By Application Development in forum Java
Replies: 0
Last Post: 06-07-2007, 08:01 AM
-
By Application Development in forum C
Replies: 8
Last Post: 11-27-2005, 02:26 AM
-
By Application Development in forum Microsoft Exchange
Replies: 3
Last Post: 08-11-2005, 07:19 PM