Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


[java] AWT or Swing? Which do you use?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 eboz   Members   -  Reputation: 122

Like
Likes
Like

Posted 23 May 2001 - 04:29 AM

Ok, This isn''t a "Which is better" thread, but I''m hoping to prompt a discussion the strengths and weakness in using each in game development. Also, though it is an issue, for the sake of argument, lets assume that all users will have the latest 1.3 JRE. To start this, I''ll take a stab at it.. ASSUMPTION: In this case, assume that the game will not use many controls and will mostly be done as Images drawn onto a canvas (i.e. even menu structures will be images). AWT: The advantage I can see is it''s lightweight nature. For most non-puzzle games, I want all I can get from a system, and the more lightweight my window/applet can be, the better in the long run. Since I''ll be tracking mouse events and keyboard events on the main canvas, and not using controls, this should be enough...Of course, I''ll need to use double buffering. SWING: This is a bit more heavyweight, but gives me some advantages. One is that it will handle double buffering for me (swing does this automatically...). I''m not sure how much of a performance penalty I''ll see after double buffering is factored in (does anyone know?), for all I know, this could be faster in the end. PLAF doesn''t do much for me, as I''ll be doing all interface through images. Anyone want to take a stab at the pros and cons? I''m sure that as game developers, we have differing needs than the average Java programmer would experience (especially since the average Java programmer works server-side lately). Eboz

Sponsor:

#2 Chaoslab   Members   -  Reputation: 116

Like
Likes
Like

Posted 23 May 2001 - 10:39 AM

Well I wrote my own gui widgets and interface code in AWT.

hence The Chaoslab (each res has it''s own examples).

It was allot of work though but now I have ultimate control of all user interface and user interface interactions (I am working on a event recoording system for it at the moe).

Suprising size is not really an issue if you are concerned about size as for download times, once you .jar stuff it does tend to decress in size dramaticly, at least 50%.

Since swing is based on AWT any way and is slower I would recommend AWT.

And swing is not support in jdk 1.0 - 1.1.

I am not sold on swing though it does look very powerful and straight forward to use.

:-)

Regards
Cam





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS