Results 1 to 4 of 4
  1. #1
    Mr.Beans's Avatar
    Mr.Beans is offline Senior Member
    Join Date
    Apr 2009
    Virginia Beach, Virginia
    Rep Power

    Default 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,

    Joseph Pond

  2. #2
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Cambridge, UK
    Rep Power


    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

  3. #3
    sirwiggles's Avatar
    sirwiggles is offline Member
    Join Date
    Feb 2009
    Rep Power



    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:

  4. #4
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    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...

Similar Threads

  1. GUI's
    By diggitydoggz in forum New To Java
    Replies: 2
    Last Post: 12-22-2008, 10:19 PM
  2. Creating GUI's for simulators.
    By Modifier in forum New To Java
    Replies: 3
    Last Post: 11-20-2008, 01:35 AM
  3. Java Application Interface similar with Windows Themes
    By Heracles Choe in forum AWT / Swing
    Replies: 9
    Last Post: 05-02-2008, 03:47 AM
  4. Custom tgs in JSP
    By ravian in forum New To Java
    Replies: 2
    Last Post: 12-29-2007, 06:05 PM
  5. Help with custom component
    By Falcon1 in forum AWT / Swing
    Replies: 8
    Last Post: 07-21-2007, 12:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts