Author Topic: Your choice for GUI with Java? Is SWING a wise choice?  (Read 1358 times)

0 Members and 1 Guest are viewing this topic.

Offline PsychoRebellious

  • Peasant
  • *
  • Posts: 130
  • Cookies: -6
    • View Profile
    • My Rantings
Your choice for GUI with Java? Is SWING a wise choice?
« on: June 05, 2014, 06:28:14 pm »
I've been learning JAVA for a while from this book teach yourself java in 24 days. I am on the chapter where they walkthrough the GUI using Java swing library, I've done a little googling and seems like not everybody is in favor of swing. My question to the Java programmers in this community: Do you use swing? is it a wise choice?
I am looking forward to making a living with android development or desktop application development. I've chosen Java as a medium so can you really get java based projects online with knowledge of Swing?

Offline ThePH30N1X

  • Peasant
  • *
  • Posts: 50
  • Cookies: 18
  • Java Programmer
    • View Profile
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #1 on: June 05, 2014, 07:44:57 pm »
I use swing. I think that it's really good, but I have never looked into anything else.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #2 on: June 05, 2014, 07:55:38 pm »
It's best to know a few GUI libs, but Swing is pretty efficient. I use it all the time.
For android it's a whole new thing, there is no Swing there.
« Last Edit: June 05, 2014, 07:56:02 pm by Kulverstukas »

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #3 on: June 05, 2014, 09:15:18 pm »
I've been learning JAVA for a while from this book teach yourself java in 24 days. I am on the chapter where they walkthrough the GUI using Java swing library, I've done a little googling and seems like not everybody is in favor of swing. My question to the Java programmers in this community: Do you use swing? is it a wise choice?
I am looking forward to making a living with android development or desktop application development. I've chosen Java as a medium so can you really get java based projects online with knowledge of Swing?

Quote
Do you use swing?

Yes.

Quote
is it a wise choice?

Depends. Certainly not for Android programming, but it is alright for desktop applications.
However, JavaFX is newer and might replace Swing in the future. Since you are just starting, I would probably go with JavaFX, if I where you.

Look into the Oracle tutorials as they are the most reliable source:
Swing: http://docs.oracle.com/javase/tutorial/uiswing/index.html
JavaFX: http://docs.oracle.com/javase/8/javase-clienttechnologies.htm
There is much bad stuff out there, especially when it comes to teaching Swing. Don't spoil yourself.

Offline PsychoRebellious

  • Peasant
  • *
  • Posts: 130
  • Cookies: -6
    • View Profile
    • My Rantings
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #4 on: June 05, 2014, 09:59:58 pm »
I guess I've got my answer. Since nobody else here is having any problems with Swing here I should give it a go too.
Quote
However, JavaFX is newer and might replace Swing in the future. Since you are just starting, I would probably go with JavaFX, if I where you.

As kulv just said, there's no harm in learning more than one library. I'll look into JavaFX once I have a good command on Swing.  ;)

Offline Matriplex

  • Knight
  • **
  • Posts: 323
  • Cookies: 66
  • Java
    • View Profile
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #5 on: June 05, 2014, 11:34:27 pm »
Oh Swing... it's a pretty good choice, but boy can it get messy. Very messy. However it's probably one of the best choices for regular Java. The ability to use HTML and CSS inside the elements can help a lot too, depending on what you are doing. As Deque mentioned, JavaFX is another route but I'm not super familiar with it, so I won't pretend I am.

If you want to get something really nice looking and have lots of time, I suggest looking into some of the OpenGL GUI libraries. One of the most common is Nifty. Get an OpenGL binding (LWJGL or JOGL), give yourself plenty of time, and you can get a verrrry nice looking GUI going. The cool thing about this is that you can deploy it to Android (or IOS if you look into using LibGDX's RoboVM) very easily.
\x64\x6F\x75\x65\x76\x65\x6E\x00

Offline ThePH30N1X

  • Peasant
  • *
  • Posts: 50
  • Cookies: 18
  • Java Programmer
    • View Profile
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #6 on: June 05, 2014, 11:44:49 pm »
OpenGL GUIs will be very hard (To learn) and take a lot of time to do, but if done correctly they will be very magnificient and have a lot of potential.

Offline Matriplex

  • Knight
  • **
  • Posts: 323
  • Cookies: 66
  • Java
    • View Profile
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #7 on: June 05, 2014, 11:46:26 pm »
OpenGL GUIs will be very hard (To learn) and take a lot of time to do, but if done correctly they will be very magnificient and have a lot of potential.

Never said it was easy :)
It certainly does take a lot of time, and shouldn't be taken up lightly.
\x64\x6F\x75\x65\x76\x65\x6E\x00

Offline makhan

  • /dev/null
  • *
  • Posts: 7
  • Cookies: 0
    • View Profile
Re: Your choice for GUI with Java? Is SWING a wise choice?
« Reply #8 on: August 06, 2014, 11:13:41 pm »
in Short Swing is Awesome i never find it messy
i also try JavaFx which is cool somehow for animation and high Graphics
but the good part is that we can use both Swing and JavaFx together ......