Jump to content
  • Advertisement
Sign in to follow this  
RobAU78

[java] Use Swing Components?

This topic is 4617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

It seems to me that Java's Swing components (JButtons, JTextFields, etc) have a lot of overhead that isn't necessary for developing games. So I'm wondering if making my own group of non-Swing components might be better. Does anyone have any thoughts to offer here? Thanks, Rob

Share this post


Link to post
Share on other sites
Advertisement
Couple thoughts,

1) Swing components have gotten a lot better and a lot less bloaty in recent versions
2) You could always use AWT components
3) There are 3rd-party component libraries out there. IBM has SWT which is apparently pretty sweet. It uses a lot of native code, which has its pros and cons (pros = performance, cons = different binaries for each OS, and cross-platform compatibility is questionable)
4) There's no reason why you can't make your own custom components. However in my experience, making your own custom widgets is one of those things that seems like a good idea at the time, but turns out to be way more work than you expect, and isn't worth the trouble in the long run.
5) Although, since we're talking about games, it may be worth it to make your own components for the sake of appearance. Games are suppossed to look good, and all of the GUI libraries mentioned so far are pretty butt-ugly

Share this post


Link to post
Share on other sites
Thanks for your thoughts, Pinacolada.

Right now, I'm working on an interface shell to use in my 4X space strategy game project. At the moment, I'm using Swing components to get the basic functionality down. Eventually, though, I think I'll make my own custom components.

Thanks again,
Rob

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!