0

I have a relatively large program that I'm working on that's about half finished. So far, all I have used for graphics are things like JFrame, JPanel, and a myriad of JComponents. In the future, I will be painting really 2D or 3D images to the screen but for right now all I'm doing is the GUI and title/game screen. I just realized that there are two graphical categories called SWING and AWT and I looked at some AWT code and it looked quite a bit different than what I have been using. What do you think, should I try to convert all of my code to AWT format or leave it the way it is? Thank you for your time.

keyert
  • 255
  • 1
  • 4
  • 12

1 Answers1

3

AWT is actually a bit deprecated native-dependant GUI. It has lots of problems (including performance) and doesn't really act well on all of the various platforms.

The best way is to use either Swing, JavaFX or SWT to create rich desktop applications on Java. Each of the has lots of pros and cons - it would take a year to tell about all of them. The best way is to watch some of the samples and demos and decide what is best for you.

I have already decided for myself that Swing is the best and most stable GUI platform for now. In your case either Swing or JavaFX might be the best due to lots of possible work with 2D/3D graphics.

Mikle Garin
  • 10,083
  • 37
  • 59