Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (756)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Do you use Swing in your game? Why/Why not?  (Read 3666 times)
0 Members and 1 Guest are viewing this topic.
Offline Addictman

Senior Devvie

Medals: 3
Projects: 1

Java games rock!

« Posted 2005-03-18 09:25:49 »


This is simply a note out of curiousity. I have found myself using swing sometimes, and trying to avoid it at other times. What do you guys prefer?

Edit: With Swing, I basically mean UI components that extend JComponent, like JButton, JTextField, and so on.
Offline kevglass

« JGO Spiffy Duke »

Medals: 319
Projects: 25
Exp: 22 years

Coder, Trainee Pixel Artist, Game Reviewer

« Reply #1 - Posted 2005-03-18 09:36:36 »


- Completeness of the widget set
- Configurability / Look and Feel
- Reliability of simple components
- Low development time cost


- Querky implementations for more complex components
- Complexity integrating with with an accelerated canvas
- Performance

I tend to steer clear if possible these days, though I nearly always use it for the associated game process tools (level designers, scenario generators etc..)


Offline K.I.L.E.R

Senior Devvie

Java games rock!

« Reply #2 - Posted 2005-03-18 22:06:56 »

I use Swing.

It's very fast and doesn't cosume much resources; I run it on another thread.

Is there a name for a "redneck" programmer?

Unemployed. Wink
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Addictman

Senior Devvie

Medals: 3
Projects: 1

Java games rock!

« Reply #3 - Posted 2005-03-19 19:34:30 »

Lately, I've started to use some swing components (like JTextField) for handling easy user input. But, I never draw them. They are just "there", requesting focus when the game wants user input, and then I have a custom created gui component "mirroring" the textField input to show to the user (with a more appealing-looking tailored image font). I find that this is easiar than going out creating your own L&F for the components.

Of course it's basically just a quick-hack, but for stuff like input, that happens infrequently in my game, it does the job.

And, I use swing components like JTextArea alot for multiplayer in-game chat.

Beyond that, my on-going project is not really using swing at all. However, I can see that in some games (with alot of static unmovable objects on the screen), swing would do nicely.
Offline sherl0ck

Junior Newbie

Java games rock!

« Reply #4 - Posted 2005-03-23 09:40:28 »

IMHO, Swing is pretty darn fast today, espcially with 1.5, so I   think we could use swing for game programming, unless you want to do with 3D.  Tongue
Offline Addictman

Senior Devvie

Medals: 3
Projects: 1

Java games rock!

« Reply #5 - Posted 2005-03-23 12:41:52 »

also, the previously mentioned point:

"- Complexity integrating with with an accelerated canvas"

is getting on my nerves. Fullscreen is of course not an issue, but windowd mode is. Naturally, one wants to do things the "right way" (we all strive towards it, I guess), and hacks to use canvas with swing, or buffering the frame itself, and translating its graphics from its insets .. It just seems so dirty. I wish there was a real JCanvas already!
Offline sillysoft

Junior Devvie

Projects: 1


« Reply #6 - Posted 2005-03-28 03:57:09 »

I use swing because it provides many good components that I want. They aren't totally pretty, but they work well.

Offline bmyers

Junior Devvie

« Reply #7 - Posted 2005-03-29 18:10:48 »

We are using Swing heavily in our game, both in 2D and 3D, as well as with our world-builder and unit-builder editors.  The speed of development can't be beat, it has a good design, you can plug-in different look-and-feels, and the performance keeps getting better and better.

Offline themaynard

Innocent Bystander

Java games rock!

« Reply #8 - Posted 2005-04-11 19:01:59 »

Here's a question...I'm required to use swing in my project, however I'm also using an active renderer. So basically I have a thread calling "paintComponents" at some target fps in order to draw my "rendered" area as well as a minimal gui. This concept is close to the way JFreeRails operates.

Everything seems to work ok, until I needed a modal dialog. Since my rendering thread is synchronized with the system event queue, any modal dialog kills my ability to draw anything...thus making my tool nothing more than a glorified "window eraser."

Has anybody encountered anything like this? And if so, is this something I just have to live with?

Questions/Comments are more than welcome.

Pages: [1]
  ignore  |  Print  

DesertCoockie (58 views)
2018-05-13 18:23:11

nelsongames (88 views)
2018-04-24 18:15:36

nelsongames (78 views)
2018-04-24 18:14:32

ivj94 (763 views)
2018-03-24 14:47:39

ivj94 (95 views)
2018-03-24 14:46:31

ivj94 (647 views)
2018-03-24 14:43:53

Solater (108 views)
2018-03-17 05:04:08

nelsongames (189 views)
2018-03-05 17:56:34

Gornova (430 views)
2018-03-02 22:15:33

buddyBro (1090 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!