Custom Look and Feel

Hi… I would like to know how to implement a custom look and feel on the AWT components I am designing for my game that I am doing…

I dont want to use the other look and feel that is availble by the packages but the one I wish to design… :slight_smile:

Thank you!

Hi ENC,

I’ve good news and bad news for you. You cannot have a custom look and feel on AWT components. Why ? Because they
are actually native platform dependent components with a wrapper around them to make them sort of identical.

You can have a custom look and feel on Swing components (javax.swing.* package).
To do this is not a trivial task but i’ll give you some pointers :

http://java.sun.com/products/jfc/tsc/articles/sce/index.html - an articicle on implementing custom L&F (high-level)
http://www.csie.ntu.edu.tw/~piaip/docs/Swing/Chapter21html/ - a whole chapter on the subject.

If you really don’t want to use Swing, there is only one alternative and that is extend the java.awt.Panel class and do all the event
handing and repainting yourself…

Have fun designing !

Erik

Hey Thanks!

I will take note off it… ;D

Erik… I more or less got the concept… but then is there any development tool that will have me to design the UI?

cause one of my team member is doing the UI as well just that she does not really know programming… but extremely good in graphics…

just would like to know… :smiley:

I am sorry ENC, there is no such tool that I know of…

… but please correct me if i’m wrong :slight_smile:

If all you want to do is change the colours and other cosmetics, its easy, just modify/extend the java metal look and feel.