• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Question about assignment.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


The user must be able to select the operating mode, although it is acceptable that the program stay in one mode once it has started up.


If i need to build a GUI to let user select operation mode at first.If needed,how can i implement it?
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ZhengQi:
It is a big question!
Do you have any ideas on it??
~dennis hu~
 
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ZhengQi,


If i need to build a GUI to let user select operation mode at first.If needed,how can i implement it?


That's up to you, but most, including myself, have opted to select the mode based on the command line.
Hope this helps,
Michael Morris
 
ZhengQi Huang
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Michael for your advice!!!
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create a GUI(JPanel) which contains a Label some thing like " Please select ur login mode" followed by a combo box with the option for local or remote. Here if the user selects Remote then append a text field to the same GUI(JPanel) for reciving the remote IP. Finally have a ok button which will deside the the local or remote based on the selection u made earlier will set a flag. Using this flag make a call to a class which implements Factory pattern and return the reference of the appropriate DataInterface class.
regards,
RameshKumar
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!