Java Swing Tutorial Day 1. LEARN HOW TO CREATE A GUI!

Java Swing Tutorial Day 1

G'Day fellow replers. After noticing barely any people learned from my first tutorial series, I decided to stop teaching Java OOP. Now I will be teaching something more fun.


javax.swing is a built in package in java which you can get by importing it. Swing is used for making GUI's which are Graphical User Interfaces. This is like pythons TKinter. Both of these help you to create Desktop applications.

But what are some examples of swing being used? Isn't everyone useing javafx now and swing is supposedly really trash?

* IntelliJ: A java IDE which is written using java swing
* NetBeans: Another java IDE which is written using java swing
* Eclipse: YET Another java IDE which is written using java swing
* SQuirrel SQL Client: A place where you can use SQL...
* yEd: A general-purpose diagramming program with a multi-document interface(According to wikipedia) which uses java.swing
* I cannot confirm it but Minecraft might use swing.

And here are some programs I made with swing:

This is just a few examples of wher swing is used. But the best thing about Swing:


If you make a swing application then jar it up(make it into a jar file), Any OS would be able to run it(And this is true for all java applications).

It is also extremely simple is you already know some java.

Yes it really is. It is as simple as...

That's it! That is all you have to do to create a frame with a button that does something!

Type this in(Type, do not copy) to a new Java Swing Project and try it!

I hope y'all that liked this tutorial, enjoyed it, and learned something new. In the next tutorial, I am planning on going over more JComponents or Graphics(TELL ME IN THE COMMENTS WHICH ONE YOU WANT).

Thank you!


Day 2 is out!

You are viewing a single comment. View All

@EpicGamer007 Hola buenas noches es que tengo que elaborar 4 proyectos de este tema donde tenga un compenente ir cada proyecto, los que se van a elegir menú,radio button, lista respetable, combo