• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question about assignment.

 
ZhengQi Huang
Greenhorn
Posts: 9
  • 0
  • 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?
 
dennis hu
Ranch Hand
Posts: 40
  • 0
  • 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~
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank Michael for your advice!!!
 
Ramesh kumaar
Ranch Hand
Posts: 146
  • 0
  • 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
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic