共享一个Personal Organiser软件。
登录 | 论坛导航 -> 华新鲜事 -> 求学狮城 | 本帖共有 9 楼,当前显示第 7 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:Flying (等级:18 - 华新水车,发帖:16849) 发表:2003-06-04 23:48:04  7楼 
doubts:1) i uses JEditorPane to display HTML pages. it requires the URL of the page, how do i specify the URL if the page is in the jar archive? or u use something else to display the HTML pages? 2) the localization is not like the windows one. it's like the english version of MS-office and chinese of MS-office. therefore, different language version has different constant class. thus, there shouldn't be a problem.
Answers:
1) This problem has similar solution to the internationalization problem, supprisingly--use java resource bundles!
jEditorPane.setPage(YourClass.class.getResource("relative_path/file.html"));


2) The problem of your approach of contant class: no one can customize your application for a new language without knowning Java! Instead, if you do it using ResourceBundle + MessageFormat, the correct resource (.properties file) can be automatically loaded for the user system's default locale, and the correct language will be used automatically. Also, someone else can localize your application without a simple text editor without using any JDK at all.
Flying @way 吳穎暉
欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 9 楼,当前显示第 7 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码