Swing built into Java
Java 2 through today’s Java 22 all include Swing.
Swing has always been defined as part of Java SE. Every implementation of the Java Specifications include all the classes necessary to write and run Swing apps.
Swing is nowadays in maintenance-mode, receiving bug fixes. No further feature work is being done.
Swing is fully supported as an essential part of Java. Nevertheless, you may want to explore alternatives:
- For desktop & mobile apps, I suggest JavaFX, now implemented as OpenJFX.
- For web apps written in pure Java, I suggest Vaadin Flow framework. The client-side HTML, CSS, and JavaScript is auto-generated on-the-fly.
To deploy your Java app you must include an implementation of the Java specifications, a JDK/JRE. You can choose from any of several vendors. These vendors include: Azul Systems, Adoptium of the Eclipse Foundation, BellSoft, Microsoft, Oracle, SAP, Red Hat, IBM, Amazon, and more. All of these JDK products come with the necessary Swing classes.
You may find the jlink tool helpful in bundling a JVM within your app. If your app is modularized, you can even use jlink to strip down the bundled JVM to only include the parts your app actually uses.
You may find the jpackage tool useful in producing the final app artifact.
For more info: