Sign in to follow this  
tebriel

[java] Is Swing effectively worthless for game development?

Recommended Posts

I've spent hours trying to setup a custom look and feel for Swing. Nothing fancy--simply some different colors and a somewhat different look from the usual look that non-game apps have. I've tried looking into developing a whole custom look and feel (WAY too much work, which is why there's not many available). I've also tried using Synth, and tried customizing the Synthetica look and feel (which is supposed to be so much easier to use...) So far, altering the Synthetica look and feel seems to be the "best" choice, but I still find it lacking. You end up searching through a huge XML file looking for that one little string you need to change to alter a background color, font color, border type, etc. And to make it worse, some colors are stored in hexadecimal, and others in an XML-cluttered decimal RGB style. And of course, you're still stuck with the annoying "layout" concept to battle with every time you want to setup a unique looking dialog or screen. This is all fine if you're developing a commercial app or something that fits one of the existing look and feel designs out there. But quite frankly, for a game developer who'd rather be working out things like game logic and other more fun things, this all sucks. I'm about halfway to saying screw it all, and just working on my own little BASIC (but trivial to use) GUI API that just draws all of it's own components. I've done this before in C++, but it's very time consuming, not to mention the fact that not having to write GUI code was one of the reasons I moved to Java. Now that I've finished my meltdown: are there any alternatives out there? What does everyone else here use for GUI functionality? I'm not talking complex stuff here, basically all I need is some drop down menus, dialogs, text input/output fields, buttons, and lists that don't look the same as MS Word!

Share this post


Link to post
Share on other sites
It would actually be easier if you were to create your own complete look and feel. This way you can define all the colours yourself in a way which you can remember where and how they are defined. Of course, this means that you have to create all the UI classes which take care of drawing everything.

Share this post


Link to post
Share on other sites
There's also the Napkin look and feel, which drives you away from standard look and feels, and the aforementioned Substance. They are my favorites.

Substance not only lets you use their very good pre-defined themes and skins, but it's also very easy to create your own, custom ones. Take a look at this documentation for further help.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Oh my God, I am a Java developer and I ask myself what some Java developers have in their minds. Substance is the ugliest LnF ever made, uglier than anything I have seen in Linux, and most Linux apps aren't exactly pretty.

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Oh my God, I am a Java developer and I ask myself what some Java developers have in their minds. Substance is the ugliest LnF ever made, uglier than anything I have seen in Linux, and most Linux apps aren't exactly pretty.


Should your personal opinion render this LAF useless? I find most of the themes interesting, and if they're not good enough for you, it's rather easy to build better ones. Let the man decide about that.

Plus, I run both Linux and Windows on my laptop.. Ubuntu is my favorite distro. You can take a look at http://www.gnome-look.org or http://www.kde-look.org and take a look at many easy to use customizations that will kick windows' ass. Hard.

Share this post


Link to post
Share on other sites
Well, that's certainly a long list of things to look into further. I'm starting to stay skeptical when I hear certain L&F customization methods are "easy" (synth/synthetica are supposed to be) but there's a few new things I can look into here.
Something like fenggui is actually exactly what I had in mind as an alternative (couldn't find any since Java gui development is so focused on Swing), so I'll take a look at how they implemented things.

Share this post


Link to post
Share on other sites
Swing has very little to do with "development" as the functionality that the extended implementations of basic widgets are handy. You'll need to provide some explanation of where a Swing widget is hobbling you where a classic widget wouldn't, or where you have found you need to override the majority of Swing extensions, to make this argument.

/re the topic

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
As the developer of Substance LAF i'd be more than happy to hear a feedback about the API available for the customizations (creating new themes, watermarks, skins etc.) - use project forums or mailing lists. In case you most positively hate this LAF, well, there are other options available at http://www.javootoo.com

Kirill

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this