AWT or Swing or Any other ?

  • Thread starter Sourabh Mhaisekar
  • Start date
S

Sourabh Mhaisekar

Hi there,
I am relatively new into java world. I need to build a DSS system in java. Am confused about which GUI tool should I use. AWT, Swing or Any other third party tool.

Thanks !
 
A

Arne Vajhøj

Hi there, I am relatively new into java world. I need to build a DSS
system in java. Am confused about which GUI tool should I use. AWT,
Swing or Any other third party tool.

legacy developer skills + tight schedule or need to support old Java
versions => Swing

otherwise => JavaFX

Arne
 
L

Lew

Arne said:
legacy developer skills + tight schedule or need to support old Java
versions => Swing

otherwise => JavaFX

I mostly agree with Arne, except I expand the use cases for both.

I suggest Swing for workhorse desktop applications, that is, anything
where you need a good, solid, classic GUI framework. Even many new
apps will fall into this category sometimes.

JavaFX is newer and flashier (pun intended). Arne is right to suggest
pushing our developer skills in this direction. It is an emerging space.
The "legacy" Swing space is large and not done growing.

(Large within the Java universe, that is. Ahem.)

I've worked on many GUIs over the years including some intellectual
forebears of Swing - OPEN LOOK, Motif and similar.

http://en.wikipedia.org/wiki/OPEN_LOOK

Once you internalize the notions of event-driven programming

https://www.google.com/search?q=event-driven+programming

, in particular for Java in Swing and JavaBeans, it is pretty second-nature
to program GUIs by hand. (Even in XML.) Then wizards like the ones
Eclipse (for Android) and NetBeans (for Swing) sport make more sense.

Both Swing and JavaFX are based on the same programming principles.
So the decision becomes one of feature support and platform availability
for your customers.
 
L

Lew

Lew said:
Both Swing and JavaFX are based on the same programming principles.
So the decision becomes one of feature support and platform availability
for your customers.

I should add that Swing and JavaFX are not mutually exclusive. As mentioned in the
NetBeans documentation, you can "embed FX components using the JFXPanel Swing component."

(NB supports JavaFX development rather deeply.)
 
A

Arne Vajhøj

I mostly agree with Arne, except I expand the use cases for both.

I suggest Swing for workhorse desktop applications, that is, anything
where you need a good, solid, classic GUI framework. Even many new
apps will fall into this category sometimes.

JavaFX is newer and flashier (pun intended). Arne is right to suggest
pushing our developer skills in this direction. It is an emerging space.
The "legacy" Swing space is large and not done growing.

(Large within the Java universe, that is. Ahem.)
Once you internalize the notions of event-driven programming

https://www.google.com/search?q=event-driven+programming

, in particular for Java in Swing and JavaBeans, it is pretty second-nature
to program GUIs by hand. (Even in XML.) Then wizards like the ones
Eclipse (for Android) and NetBeans (for Swing) sport make more sense.

Both Swing and JavaFX are based on the same programming principles.
So the decision becomes one of feature support and platform availability
for your customers.

Both are event driven.

And you can write JavaFX relative similar to how you write Swing.

But if you utilize all of JavaFX it changes the entire style.

V in FXML, C in JS and M in Java will be very different from
a Swing app.

It could have the same impact as the switch from servlet only
to mix of JSP and servlet for web GUI had 13 years ago.

Arne
 
A

Arne Vajhøj

Nearly everything now is Swing.
see
Nah.

http://mindprod.com/jgloss/swing.html

#The biggest gotcha is that you no longer add directly to your Swing
#containers. Any content inside a JFrame should be placed inside its
#contentPane. You must do a:
#
#Container pane = swingContainer.getContentPane();
#
#and add to it. Unfortunately the add method is still defined for the
#Swing Containers to entrap the unwary.

You can certainly add directly to most containers.

And JFrame add has been forwarding to getContentPane add
since Java 1.6 (2006!).

#JavaFX Mobile is a platform for cell phones based on Java and Linux.

First JavaFX Mobile is only part of all JavaFX.

Second JavaFX Mobile did run on Windows Mobile, which
obviously is not Linux based.

#JavaFX Script is a statically typed scripting languages for use in
#devices such as TV set top boxes.

JavaFX Script was intended to be used on all JavaFX platforms
not just TV's.

And JavaFX Script was abandoned in JavaFX 2.x.

Arne
 
R

Roedy Green

JavaFX is newer and flashier (pun intended). Arne is right to suggest

Read my experiences. It simply did not work. see
http://mindprod.com/jgloss/javafx.html

It was not that long ago.

Further it has quite limited browser support.

It is one more package the user has to install. I was unable to get
one developer who wanted a mirror copy of my website to install Java
to deliver it to him. He was terrified of it.

I am nervous of any new technology. They are sent up like trial
balloons. If they don't catch on, they are abandoned.
 
A

Arne Vajhøj

Read my experiences. It simply did not work. see
http://mindprod.com/jgloss/javafx.html

It was not that long ago.

Since the page talks about JavaFX Script, then it is obsolete.
Further it has quite limited browser support.

Browsers do not have to support JavaFX at all. Browsers support
a Java plugin. And then it is up to the Java plugin.

And applets are so much out of fashion anyway, that most likely
JavaFX will be more used for desktop apps than for applets.
It is one more package the user has to install.

No.

The JavaFX 2.0 runtime is now in the standard Java distrubution
(only in Oracle, but when talking about non-server usage, then
that is by far the most common).
I was unable to get
one developer who wanted a mirror copy of my website to install Java
to deliver it to him. He was terrified of it.

Maybe he was misinformed by someone.

:)

Arne
 
L

Lew

"Simply did not work" is not a very deep investigation.

In geological terms?

Which version did you try? When was this? What did you do exactly?
Since the page talks about JavaFX Script, then it is obsolete.

"8. Does JavaFX 2 support JavaFX Script?
Starting with JavaFX 2.0, JavaFX Script is no longer supported. "
http://www.oracle.com/technetwork/java/javafx/overview/faq-1446554.html#3
Browsers do not have to support JavaFX at all. Browsers support
a Java plugin. And then it is up to the Java plugin.

There is a page that lists what's certified to be supported:
http://www.oracle.com/technetwork/java/javafx/downloads/supportedconfigurations-1506746.html

The only notable exceptions are Chrome on Mac and Internet Explorer on non-Windows platforms.
And applets are so much out of fashion anyway, that most likely
JavaFX will be more used for desktop apps than for applets.

Most of the JavaFX documentation focuses on that use case.
No.
The JavaFX 2.0 runtime is now in the standard Java distrubution
(only in Oracle, but when talking about non-server usage, then
that is by far the most common).

Yes, one developer's pathological phobia is sufficient evidence for a worldwide policy.

He needs a psychiatrist, not an engineer.
Maybe he was misinformed by someone.
:)

Or maybe he's a psycho.
 
A

Arne Vajhøj

#The biggest gotcha is that you no longer add directly to your Swing
#containers. Any content inside a JFrame should be placed inside its
#contentPane. You must do a:
#
#Container pane = swingContainer.getContentPane();
#
#and add to it. Unfortunately the add method is still defined for the
#Swing Containers to entrap the unwary.

You can certainly add directly to most containers.

And JFrame add has been forwarding to getContentPane add
since Java 1.6 (2006!).


#JavaFX Mobile is a platform for cell phones based on Java and Linux.

First JavaFX Mobile is only part of all JavaFX.

Second JavaFX Mobile did run on Windows Mobile, which
obviously is not Linux based.

#JavaFX Script is a statically typed scripting languages for use in
#devices such as TV set top boxes.

JavaFX Script was intended to be used on all JavaFX platforms
not just TV's.

And JavaFX Script was abandoned in JavaFX 2.x.

I suggest that you start posting links to Wikipedia
instead.

Usually there are more details and it is more correct
and more uptodate.

And therefore a better service for the cljp readers.

Arne
 
R

Roedy Green

"Simply did not work" is not a very deep investigation.

Lew, are you ever stupid lazy and dumb. Can't you read?

It says "SEE". That's where the detail is. But you are so
fucking ignorant, you don't get it. How dare you pose
as a computer programmer. You should give up.

That's what you do to everyone else.
 
L

Lew

Roedy said:
Lew wrote, quoted or indirectly quoted someone who said :


Lew, are you ever stupid lazy and dumb. Can't you read?

Wow, really? You just love to be abusive, huh?
It says "SEE". That's where the detail is. But you are so
fucking ignorant, you don't get it. How dare you pose
as a computer programmer. You should give up.

That's what you do to everyone else.

I did look at your site. It's as full of errors and misinformation as Arne has said.

Keep your potty-mouth to yourself. And before you go calling people "ignorant", you
might want to cast the beam out of your own website's eye. You constantly post self-
serving links to your own site, despite the inaccurate and incomplete information there,
and the utter lack of insight into what you're describing, often ignoring better responses
others have provided before you post.

In this case, you did a half-assed investigation on an obsolete version of JavaFX and
now you're abusing people who call you on it.

Your egotistical and violent reaction to justifiable criticism is a condemnation of your
own character. Get over yourself. Stop being a violent bully and projecting your own
deficiencies onto others.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,820
Messages
2,569,723
Members
45,510
Latest member
ThaliaMaxi

Latest Threads

Top