Reputation: 1150
I want to use LWUIT for making GUI of my application in good way. But the problem I am facing is I am not able to use a theme.
I had followed this link The Lightweight User Interface Toolkit LWUIT An Introduction.
I had used this code to load the theme. But it is giving me exception.
try {
Resources r = Resources.open("theme.res");
UIManager.getInstance().setThemeProps(r.getTheme("theme"));
} catch (IOException ioe) {
System.out.println("Couldn't load theme.");
}
Upvotes: 0
Views: 841
Reputation: 240860
from the code it seems it could throw FileNotFoundException
Double check your theme.res
file should be in default package. if its in some package then
Resources r = Resources.open("/com/mycompany/somepackage/theme.res");
Upvotes: 1