我想使用 LWUIT 来以良好的方式制作我的应用程序的 GUI。但我面临的问题是我无法使用主题。
我点击了这个链接The Lightweight User Interface Toolkit LWUIT An Introduction .
我使用此代码来加载主题。但这给了我异常(exception)。
try {
Resources r = Resources.open("theme.res");
UIManager.getInstance().setThemeProps(r.getTheme("theme"));
} catch (IOException ioe) {
System.out.println("Couldn't load theme.");
}
最佳答案
ResourceEdit 文件存储在哪里?我认为你在这里犯了错误。检查您的工作空间。
将 ResourceEdit 文件存储在“src”文件夹中。
Display.init(this)
方法必须在显示任何表单之前调用。看这个link供您引用。
关于java - 如何使用LWUIT主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4873896/