Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.gui > #1767
| From | "tar" <tar@THRWHITE.remove-dii-this> |
|---|---|
| Subject | Re: executing a program t |
| Message-ID | <ymivedzsnyg.fsf@sevak.isi.edu> (permalink) |
| Newsgroups | comp.lang.java.gui |
| References | <1181220332.694156.257190@j4g2000prf.googlegroups.com> |
| Date | 2011-04-27 15:35 +0000 |
| Organization | TDS.net |
To: comp.lang.java.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 --- * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet! --- Synchronet 3.15a-Win32 NewsLink 1.92 Time Warp of the Future BBS - telnet://time.synchro.net:24
Back to comp.lang.java.gui | Previous | Next — Previous in thread | Find similar | Unroll thread
executing a program throu "anshul saprey" <anshul.saprey@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000 Re: executing a program t "Lew" <lew@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000 Re: executing a program t "tar" <tar@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000
csiph-web