Results 1 to 4 of 4
Thread: Swing themes & custom GUI's
- 04-24-2009, 02:28 AM #1
Swing themes & custom GUI's
I'm trying to make a program and I want it to have a relatively good-looking gui.
I want it to look a lot like the program in the picture below.
Could someone explain to me or link me to a good place on doing such a thing in java using swing.
Do you think that they used some sort of window gui library or something more like SDL?
Would it be best to use Java2D for much of the interface?
Thank you for your time and effort,
- 04-24-2009, 02:48 AM #2
Swing comes with a number of "look and feels" that hook into native code to make drawing everything very quick. You could subclass every component and do the drawing yourself in Java 2D, but it would make the application rather bulky and slow to render. You could easily use a JLabel to create those image-text combinations though.Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
How To Ask Questions The Smart Way
- 04-27-2009, 03:02 AM #3
The picture you supplied their could be created using mostly if not all icons.
You can add icons too nearly all swing components, start off small and build up.
I would suggest to start buy creating labels with icons, which is what them activite links on the image you supplied would use.
Next think about backgrounds and tab components, which i can see would also need to be used here.They're 10 people in the world, those who speak binary, and those who dont.
^ Lame i know, but i can actually count in it nowadays! :eek:
- 04-28-2009, 03:10 AM #4
I'm working on a project where the architect wanted a complex LAF. It looks *very* nice, except when it doesn't display correctly (like, drag and drop doesn't highlight list items).
I suggest starting with Metal and the Ocean theme, which is the current default LAF and theme. It's actually fairly attractive. Build out your UI using that for a start. Buttons and labels can take images along with their text, which provides a lot of the flexibility you need.
I have tinkered with the Ocean theme, changing some of the colors slightly and changing a few component borders. It's very difficult to sort out initially, but then it is relatively easy.
Last, you can override the paint() method of the standard components. I made a button with rounded corners and all kinds of shading using Java 2D. The performance hit isn't that great, since the UI will do similar actions anyway.
If you send my a private message with an e-mail address, I'll send you a .zip with a bunch of utility code. A lot of it I created for a production system, so it's not just hacked together. It should give you some ideas as you look at Sun's Tutorial...
- By diggitydoggz in forum New To JavaReplies: 2Last Post: 12-22-2008, 10:19 PM
- By Modifier in forum New To JavaReplies: 3Last Post: 11-20-2008, 01:35 AM
- By Heracles Choe in forum AWT / SwingReplies: 9Last Post: 05-02-2008, 04:47 AM
- By ravian in forum New To JavaReplies: 2Last Post: 12-29-2007, 06:05 PM
- By Falcon1 in forum AWT / SwingReplies: 8Last Post: 07-21-2007, 01:39 PM