Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

GUI on Java

  1. Mar 30, 2016 #1
    Dear friends!

    Please explain me what API/Libraries uses in Java for create graphic user interface. I use SWING but I hear that SWING is oldest technology. What you uses?
     
  2. jcsd
  3. Mar 30, 2016 #2

    Borg

    User Avatar
    Gold Member

    It really depends on what you're building but you might start with Java AWT.
     
  4. Mar 30, 2016 #3

    jedishrfu

    Staff: Mentor

    Swing is still the thing. It's been around but GUIs don't really change that much on the application side. A smaller group of programmers have used SWT and JFace (most notably the Eclipse IDE developers its more OS native like)

    Some folks have branched into web technology in which case its most likely html+css+javascript or a javascript ibrary like ExtJS or more recently Elm.
     
  5. Mar 30, 2016 #4

    jedishrfu

    Staff: Mentor

    I'm not a fan of AWT. Historically, Swing replaced AWT because deficiencies in it its GUI programming model. I think it was too geared toward MS Windows technology.

    http://stackoverflow.com/questions/408820/what-is-the-difference-between-swing-and-awt

    From this article it says Swing is more of a pure java GUI. Its the same across platforms vs AWT which changes from platform to platform.

    Also for Swing, there's a nice GUI designer in Netbeans that uses drag and drop to create your GUI design. You then wire in the code behind the GUI which gets trickier. I've seen some programmers at work really do some amazing stuff with it.
     
  6. Mar 30, 2016 #5

    Borg

    User Avatar
    Gold Member

    IntelliJ has something similar but you have to be careful with the dependancies. Sometimes the IDEs create dependancies on their own jars when you use certain features.
     
  7. Mar 30, 2016 #6
    Ok. Thanks a lot for all.
    I start learn Java GUI from AWT. After study SWING. And it's all.
    I use java only for Win application. May bee after for android in future.
     
  8. Mar 30, 2016 #7

    jedishrfu

    Staff: Mentor

    One caution is to not mix AWT with Swing components as youll run into a lot of odd problems.

    Also Swing is a richer set of components that look the same no matter where your app runs ie windows or macosx or linux.
     
  9. Mar 30, 2016 #8

    QuantumQuest

    User Avatar
    Gold Member

    We used to utilize AWT more than ten years ago, to create some fancy applets. It is not used anymore by the vast majority of Java developers. Swing is still the thing as jedishrfu points out. You can start right from this in my opinion and I recommend this title https://www.amazon.com/Swing-Second-Edition-James-Elliott/dp/0596004087 by OReilly publishing and of course the standard documentation from Oracle, for updated and full info. When it gets to create an interface for an app for the web, it is best to mix and match technologies and this includes Java frameworks as well.
     
    Last edited by a moderator: May 7, 2017
  10. Mar 30, 2016 #9

    Ibix

    User Avatar
    Science Advisor

    Note that the Android GUI is a rather different beast to either Swing or AWT. Most controls behave similarly, but things like the top level Activity class are very different (unless Swing has changed a lot in the last ten years).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: GUI on Java
  1. Vb.net\ Gui (Replies: 5)

  2. Java GUI (Replies: 3)

  3. Arduino and GUI (Replies: 2)

Loading...