swing comments from an ex-C++ motif programmer



Hello,

I am new to java and am just starting to use swing. It initially seems
great because it is easy to quickly knockup an app that looks more or
less like what you want. However, I am finding that for non-trivial
apps that need to be of production quality its a different story. It
seems quite painful to me.

It reminds me of how painful it used to be in C++ when using motif.
However with Motif at least it was possible to get the result you
wanted and the result always looked nice. The same does not seem to be
true of swing, IMO. I remember what happened with C++/Motif. A number
of competing toolkits were developed, some proprietary, some open
source. A number of them, mainly the open source ones, survived to the
present day. GTK is one of my favourites. I am not talking about the
look and feel (LAF). I am aware of efforts to add a GTK LAF to swing.
What I am after is a toolkit that is built on swing that makes things
easier to code, possibly with a GUI builder (e.g like GTK has glade).
Whilst some toolkits do seem to be evolving in java they seem to be
concentrating on the LAF rather than making coding easier. Maybe this
is because swing components do not look nice by default.

As a relative latercomer to java I am shocked at the state of play
when it comes to GUI programming. I wonder why that is. Perhaps it is
because GUIs are moving over to being web based? Perhaps some
experienced java developers on this ng can comment please? I think
that web development (i.e development of web stds) has a long way to
go before a web page can offer the same rich GUI experience that a
custom-built non-web app can deliver. What do other people think?
Maybe I haven't been looking at the right web pages? Are there really
pages around that offer slick presentation, fast response and a modern
LAF? I can't think of any offhand. So in the meantime I would like to
develop my apps in swing. Can anyone recommend a toolkit ontop of
swing that might make my task easier? I had a quick look on freshmeat
but could not find anything suitable.

<whinge>
In particular I find it very awkward to implement a non-trivial JTable
component. I want my table to be non-editable by the end-user but
programmatically updated (rows added/deleted/changed) upon the
asynchronous arrival of events from a third-party API. I want to be
able to set the color of cells depending on data that arrives via this
API. I have found a crude way to do it by extending
DefaultTableCellRenderer but I want something better. I was expecting
to be able to set the attributes of any cell in my table via methods
on the table, methods that address the cell of my choice. Suppose I
want to set the font? I wonder how I will have to do that - probably
by overriding some other kind of renderer. What a load of hassle.
</whinge>

Regards,

Andrew Marlow

.



Relevant Pages

  • comp.lang.java.gui FAQ
    ... Q1.3 There are so many Java FAQs. ... Q1.4 Does Sun support or endorse this FAQ? ... Q3.2 How do I update the GUI from another thread? ... Q4.2 What is the Swing single-threading issue? ...
    (comp.lang.java.gui)
  • comp.lang.java.gui FAQ
    ... Q1.3 There are so many Java FAQs. ... Q1.4 Does Sun support or endorse this FAQ? ... Q3.2 How do I update the GUI from another thread? ... Q4.2 What is the Swing single-threading issue? ...
    (comp.lang.java.programmer)
  • comp.lang.java.gui FAQ
    ... Q1.2 There are so many Java FAQs. ... Q1.5 What is Swing? ... Q2.1 My GUI freezes or doesn't update. ... Q2.5 How can I make a transparent or non-rectangular window? ...
    (comp.lang.java.gui)
  • comp.lang.java.gui FAQ
    ... Q2.1 My GUI freezes or doesn't update. ... Q2.5 How to create a transparent or non-rectangular window? ... Q5.1 What is the equivalent of AWT's Canvas in Swing? ... Q5.3 How do I generate some charts / plots in Java? ...
    (comp.lang.java.gui)
  • comp.lang.java.gui FAQ
    ... There are so many Java FAQs. ... My GUI freezes. ... More Swing ... This is the FAQ for the comp.lang.java.gui newsgroup. ...
    (comp.lang.java.gui)