Java offers great APIs like Swing and Java FX for developing GUI clients. Swing was really popular a couple of years back but C# has now taken lead but Java FX is another popular Java API for developing GUI applications in Java.
If you want to develop a GUI application like NetBeans, one of the famous Java editors which are also written in Java then you can learn Java FX in 2023. I wouldn’t advise learning Swing unless you are working for a bank that is paying you thousands of dollars per month maintaining their Swing-based trading GUI.