swing comments from an ex-C++ motif programmer
- From: apm35@xxxxxxxxxxxxxxxxxx
- Date: Fri, 31 Aug 2007 01:40:25 -0700
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
.
- Follow-Ups:
- Re: swing comments from an ex-C++ motif programmer
- From: Hunter Gratzner
- Re: swing comments from an ex-C++ motif programmer
- From: Mark Space
- Re: swing comments from an ex-C++ motif programmer
- Prev by Date: Re: Shutdown computer with message
- Next by Date: Re: Newbie - JAR question
- Previous by thread: How do I put my Java program online as an applet?
- Next by thread: Re: swing comments from an ex-C++ motif programmer
- Index(es):
Relevant Pages
|