Look and Feel ToolBar solution.
by
, November 15th, 2011 at 12:23 AM (9473 Views)
This solution is written coz of the problem i have faced for almost a week and after a huge panic, i came to find an alternate solution to solve the problem.
The problem is Java Synthetica BlackEye Look and Feel with the desktop application. Well, if you try to place a tool bar over your desktop application, you will
never be able to see LAF(Look and Feel) effect over it. You will most probably get even more confused if you will see the effect on the menu items. Well, what is the actual problem? Toolbar exists outside the JPanel and you can never put them on it. But you can put them on JFrame and JFrame seems not getting the LAF effect in any case.
So, what you do is, place a jDesktopPane on your JFrame and then apply toolbars to it. You will see the LAF effect over the menus as well now. Remember one thing, for Synthetica BlackEye Look and Feel, you need to have Synthetica V2.9 or above and SyntheticaBatik V1.0. If you will download the Synthetica V2.14(latest for now), you will get SyntheticaBatik in it.
Configure the API's in your application and import them.
Write this code;
in the place where you want to apply this look and feel.try { UIManager.setLookAndFeel(new SyntheticaBlackEyeLookAndFeel()); } catch (Exception e) { e.printStackTrace(); }
If you get any exception coz of this code like ClassNotFound, remember you have downloaded the older version of Synthetica, so download Synthetica latest version (recommonded) or atleast the version, specified by the LAF theme.
If there are any suggestions, feed back, comments, please post. I will appreciate the other solutions of applying LAF to toolbars other than this, if you know kindly comment.
Thanks,
Mr777