File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI Design

 
Yuqing Zhu
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, All,
Finally I'm working in my GUI now, but have some questions need your help.
1. Do we need to consider i18n issues, i.e. put all menu text and dialog message into a properties file. Or we can just hard code every thing in the code?
2. If I use Action for my menu item action, will that be considered as a MVC?
3. Do we need to put the menu structure in an external file and build the menu from that file programmatically or we can just use the simplest way, i.e. add each menu item line by line code?
every respond will be appriciated.
Thank
Yuqing Zhu
 
Sai Prasad
Ranch Hand
Posts: 560
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

1. Do we need to consider i18n issues, i.e. put all menu text and dialog message into a properties file. Or we can just hard code every thing in the code?

I would hard code the menu text and dialog message
in the code

2. If I use Action for my menu item action, will that be considered as a MVC?

Action and adding a listener to the gui component
follows Oberver/Observable pattern. To implement the MVC pattern, you can create
controllers for the JFrame and the JPanel to handle events and populate the gui components with data.

3. Do we need to put the menu structure in an external file and build the menu from that file programmatically or we can just use the simplest way, i.e. add each menu item line by line code?

hard code the menu structure in the code. You have to distribute the external file to the user anyway, and it is as good as distributing the *.jar file.
 
Adam Roberts
Ranch Hand
Posts: 71
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1. Do we need to consider i18n issues, i.e. put all menu text and dialog message into a properties file. Or we can just hard code every thing in the code?

Only thing I didn't hard code was the names of destinations/origins.
Then again I missed a few points on GUI
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic