简体   繁体   中英

How to provide a CLI for a GUI java swing application

What are the best practices to provide a CLI to an existing GUI java swing application.

For reading text fields I can use console.readLine(); or InputStreamReader(System.in) console.readLine(); or InputStreamReader(System.in) , But my GUI is having radio buttons, checkboxes, comboboxes. So what are the alternatives in CLI for these components of GUI?

My GUI application is a wizard kind of, so I want to develop CLI which have same sequence of steps as GUI wizard. Are there any best practics for writing CLI application?

Is it good to use Console class of java.io ? OR to use sys.out.println() incombination with InputStreamReader(System.in ) for writing and reading to console?

Have you heard of CHARVA? Might not be exactly what you are looking for, but seems promising. http://www.pitman.co.za/projects/charva/index.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM