AWT dropped in P2

I was checking the changes ointroduce to P3 as described in github and I notice that they talked about moving away from AWT. What is AWT and why did it lost support? I guess this was big before in Java and now something to avoid? no experience here with AWT… my experience is just right from P3. Also, how does SWING related to Java? Any relation to AWT?



AWT (the abstract window toolkit) is a GUI library that comes with Java. I talked about it at the top of the Swing tutorial:

But basically, AWT contains a bunch of classes that let you build a GUI. Stuff like Frame and Button and Applet. Before Processing 3, the PApplet class extended the Applet class, so you could treat Processing like any other AWT applet: you could embed it in a website, or directly into a Java application.

But as of Processing 3, the PApplet class no longer extends the Applet class. That means you can’t embed it as a component in a Java application.

However, Processing still uses AWT behind the scenes. The only thing that changed is that PApplet no longer extends Applet.

Swing is another GUI library that comes with Java, and it’s built on top of AWT. I’d recommend reading through the Swing tutorial above for more background.

In fact, Processing uses a mix of AWT and Swing behind the scenes, if you’re using the default renderer. But the beauty of Processing is that you don’t have to really worry about any of this.

I should read about SWING. Reading from the changes in P3, I felt there was a hurry to drop AWT and to advertised its discontinuity, specially for people developing modes or libraries. I had a feeling AWT support stopped… but as I get from you, AWT is still there and strong (?)

Not sure if I will get into the swing of things or AWT atm as Processing seems to be ok. How often is AWT and swing used in the outside world? Working with servers? Working with client applications?

Can we say that most of the Processing IDE is AWT?

I am working in your tutorials but time is limiting these days bc of work and summer… I am working on a simple REST API demo and I will try to implement it using servlet but I am also looking into node.js and firebase following one of Shiffman’s tutorial.


It was important to make sure that libraries and tools knew that PApplet no longer extended the Applet class, as that could potentially break things that were relying on that.

I don’t know if I would say that. The beauty of Processing is that it abstracts a lot of things away from you, so you don’t really have to worry about all the underlying code. You don’t have to care whether it’s AWT or Swing or OpenGL or JavaFX or something else. You can just write Processing code and have it work.

Processing still uses AWT and Swing behind the scenes, but you never have to touch that stuff.

AWT is almost never used. Swing is used very occasionally by people developing desktop applications. It’s never used by people working with server-side code, as it doesn’t really make sense to have a GUI on a server.

It all depends on what your end goal is though.

I’m not sure. But it’s open source, so we can find out by looking it up on GitHub:

Looks like the Processing editor is built using Swing, which itself is built using AWT.