wood burning stoves 2.0*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Use String Literals OR ResourceBundle in GUI Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Use String Literals OR ResourceBundle in GUI" Watch "Use String Literals OR ResourceBundle in GUI" New topic
Author

Use String Literals OR ResourceBundle in GUI

Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
just wondering what everyone else uses for button captions, dialog messages and that sort of thing.
I haven't used literals in any project since starting work, so it doesn't feel natural for the same reason, but I also dont see anything wrong with using literals, but since
URLyBird wants to move into Internet-based marketing, and hopes to be able to accept bookings direct from customers over the web
it might be a good idea not to use any literals at all, theres no mention of them wanting to switch languages but that would be a nice extra, for free, if all Strings come from a bundle.
whats your opinion on this, I dont want to do anything the assignment didn't ask for, but this almost seems to be implied.
frank sun
Ranch Hand

Joined: Apr 11, 2003
Posts: 102
I think it's not a 'imply' to support the multi-language, but ask us to consider switching the C/S architecture to B/S(Web application) in the design. IMO, it askes us to apply one design pattern(eg,MVC), to meet the future requirements.
FYR.
Frank
Seid Myadiyev
Ranch Hand

Joined: Jul 02, 2002
Posts: 196
Hello TQ,
<< Thank you for your reply :-) >>
I am more inclined to use ResourceBundle myself. I saw it being used in Swing2 Demo and besides that, like you mentioned you have done that for all your projects.
ResourseBundle is not for i18n only.
Although the statement below from instructions does not directly relate to that, I think that it still has an implication:
"Your user interface should be designed with the expectation of future functionality enhancements, and it should establish a framework that will support this with minimal disruption to the users when this occurs."
What do you all think?
Thanks,
+Seid
Ta Ri Ki Sun
Ranch Hand

Joined: Mar 26, 2002
Posts: 442
Thanks for the input guys I'll go with the ResourceBundle
 
jQuery in Action, 2nd edition
 
subject: Use String Literals OR ResourceBundle in GUI
 
Similar Threads
doubt with wrapper class code
Why did Java allow to use primitives in methods?
int as expression value
String x = "hi" ; garbage collected ?
GC question