Skip to main content
GameDev.net gamedev.net
🔒 Locked

[java] Look N Feel

Started by Preacher Jan 12, 2004 at 4:28 AM 3 replies 550+ views
Original Post
Preacher
Preacher
Hi developing a 3DChess game for a college project and i need a funky look n feel, just think to dexters lab. I have found it hard to get any tutorials ( got pointed to one on about.com but its gone now!) and looking at the basicLookNFeel classes can confuse you quickly. If anyone knows where to find any tutorials (sun seem to have nothing but design recomendation articles)or a repository of LookNFeels i can check out and maybe use i''d be very grateful Thanks
NuffSaid
NuffSaid
You might want to check this article out on how to create your own themes.

For a couple of look and feels, here are a list of some of them that I know off.
Metouia l&f
Incors
Javatoo: Very large selection of l&f

That should be enough to get you started.
==========================================In a team, you either lead, follow or GET OUT OF THE WAY.
Preacher
Preacher
Thanks Nuffsaid you gave me the address for about.com site before i think, for some reason they removed the book!! meh whatya gonna do, thanks for the help
Preacher
Preacher
I''m wondering is it worth my while designing my own Look N Feel for the game.

i don''t need a complex one just to be able to handle simple dialogs, i''ve a limited time of four months and i also have to develop a 3DInterface (Xith3D) and design a pluggable architecture(hopfully)

How fast can a simple Look N Feel be developed?
CaptainJester
CaptainJester
A simple one can be built pretty quickly. You just need to subclass one of the existing look and feel.

For example, subclass Metal and change the colours.

To subclass a look and feel you need to subclass every class that it contains. In Metal''s case, there are 39 classes.

It is pretty simple once you get the hang of it. Take a look at javax.swing.plaf.metal.MetalLookAndFeel.java. It is pretty well commented. It sets everything up. It tells the JVM which classes to use to do all the drawing and also sets up colour refs. It also sets up default short cuts/quick keys. The next thing you can look at are the xxxxxUI.java classes. You override the paint method if you want to change the way the component is drawn. In Metal''s case, you need to look at MetalButtonUI and BasicButtonUI(Metal''s parent class) to put it all together. Metal does not draw a fancy button, just overrides some of the actions and the colours.



First make it work, then make it fast. --Brian Kernighan

The problems of this world cannot possibly be solved by skeptics or cynics whose horizons are limited by the obvious realities. We need men and women who can dream of things that never were. - John Fitzgerald Kennedy(35th US President)

Do not interrupt your enemy when he is making a mistake. - Napolean Bonaparte
"None of us learn in a vacuum; we all stand on the shoulders of giants such as Wirth and Knuth and thousands of others. Lend your shoulders to building the future!" - Michael Abrash[JavaGaming.org][The Java Tutorial][Slick][LWJGL][

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.