Is it possible to change java lookandfeel without modifying the program in a real-world environment?
I know that theoretically the answer is yes. I also created demo applications and changed the lookandfeel even at runtime and it worked. But when I created a real application with lots of controls lookandfeel change was not really working:
- Different lookandfeels have different bugs (or strange features). For instance some of them creates the same style for JTextField and JFormattedTextField, some of them uses different styles. This change can be quite annoying for users.
- Control sizes are not the same (using different fonts, different borders), so sometimes the window looks ugly after change.
- Keyboard shortcuts can also be different.
- ...
In my applications after lookandfeel change (actually instead of changing the lookandfeel I tried using the same lookandfeel with different skins) I always have to modify the application. Not a very big modification, but lots of small modifications which makes lookandfeel change difficult.
Am I just very unlucky with the lookandfeels I tried (currently using skinlf), or lookandfeel change is not that easy as in small demo applications?
UPDATE: I'm using Swing and changing to other GUI library is not possible for me right now.
UPDATE2: It seems to me the question was not clear. I do know how to change the lookandfeel. My questions is: Is it possible to create a real application where changing lookandfeel (or the skin of the lookandfeel) is an easy task? Currently if I change the lookandfeel it is not enough to change 2 or 3 lines, I have to review the whole application and fix quite a few problems caused by the lookandfeel change. dhiller suggested replacing skinlf with a better lookandfeel. Can you show me a skinable lookandfeel where skin replacement works better?