java desktop application with swt?

E

Elhanan

hi.. all

a client of ours is considering to move from a dos application to
windows desktop application.


the application is for traveling agency, the database is rather large.
their current database for other application is SQL-SERVER.

they have 12 users.

i suggested doing it in winforms, but my boss is against the idea
becouse he doesn't have the man power (aside from me) to maintain it.

so he is on the side of java with swt.

to be honest my brief knowledge with winforms says it might not as
slick as VB6.

my main concern is that java is slow and non responsive when it comes
to windows interface, but ecplise 3.0 shows otherwise.

so JAVA or winforms?
 
K

kaeli

my main concern is that java is slow and non responsive when it comes
to windows interface

Not if you natively compile it as exe, it isn't. Then make a nice installer
with InstallAnywhere or such.

JMHO.

There's nothing wrong with doing it in c#.net, either. I'd go with that over
VB6 any day of the week, if those were the choices. My (admittedly somewhat
limited) experience of C#.net proved to me how simple it is to make a Windows
application with it (and it has far better error handling and stuff than VB6
does). I found it a heck of a lot easier than java swing, personally, but
then again I don't have a fancy IDE for java but I DO have VisualStudio.net,
so that might be a factor.

--
 
S

Steve Horsley

Elhanan said:
hi.. all

a client of ours is considering to move from a dos application to
windows desktop application.


the application is for traveling agency, the database is rather large.
their current database for other application is SQL-SERVER.

they have 12 users.

i suggested doing it in winforms, but my boss is against the idea
becouse he doesn't have the man power (aside from me) to maintain it.

so he is on the side of java with swt.

to be honest my brief knowledge with winforms says it might not as
slick as VB6.

my main concern is that java is slow and non responsive when it comes
to windows interface, but ecplise 3.0 shows otherwise.

so JAVA or winforms?

I know nothing about winforms.

But I know that java need not be slow and unresponsive. As you say, eclipse
proves that point, but there are lots of other java apps that are just fine.
You are probably better off with SWT than swing because swing has poor fonts
and no anti-aliasing without subclassing all the components.

Steve
 
E

Elhanan

how can you compile a java into an exe?

i got VisualEditor plugin for eclipse, would that help?

c# has a lots of dataclasses in ado.net, JDBC seems rather limited,
right?

i also understand c# has nativc classes for MS-SQL server...
 
E

Elhanan

i read somwhere that if you begin to sub-class gui in java you are in
trouble..
 
K

kjc

Steve said:
I know nothing about winforms.

But I know that java need not be slow and unresponsive. As you say, eclipse
proves that point, but there are lots of other java apps that are just
fine.
You are probably better off with SWT than swing because swing has poor
fonts
and no anti-aliasing without subclassing all the components.

Steve
I have designed and implemented a "Point of Sale" system in Java using
Swing. JDK1.4.2_05.

The performance is VERY good, at least, on a Linux system. Mandrake 10.0
to be specific. Not the performance of a Native X11 application. But,
still VERY good.

I think when writing Swing applications, number one, don't attempt if
the target JDK is any version less than 1.4.2.

number two, any IO MUST be designed from the ground up to be
multithreaded (workers,invokeLater, command patterns..etc)

number three, the Swing event thread MUST be a consideration is ALL
implementations of main and collaborator code.

I think Java on the desktop early on developed a bad reputation, and has
not yet shed that perception. Part of it, is the misconceptions
perpetuated by the MS flavored camps. Part of it from non-OO developers
who find Swing's OO architecture difficult to get their arms around.
 
E

Elhanan

to tell you the truth i don't have much exprience working with java..
and much less with multithread design.. i don't understand why IO
should be multithreaded in case of swing..

i also dont' understand the 3rd paragraph..
 
J

John McGrath

swing has ... no anti-aliasing without subclassing all the components.

As of Java 5, you can globally enable antialiasing by defining the System
property "swing.aatext" as "true". You can do this on the launcher
command line using:

java -Dswing.aatext=true ...

You can also do it programmatically with:

System.setProperty( "swing.aatext", "true" );

In this case, you must set the property *before* any other Swing code
runs. The property is queried in a static initializer in the
SwingUtilities2 class, so once that class is referenced, changing the
property will have no effect.
 
S

Steve Horsley

Elhanan said:
to tell you the truth i don't have much exprience working with java..
and much less with multithread design.. i don't understand why IO
should be multithreaded in case of swing..
Remember when Windows3 apps used to freeze while they were
thinking? Well, much the same can happen with swing apps. If the
app takes a long time to think about the response to an event
such as a button-click, then the swing thread spends lots of time
doing that thinking and not getting back to updating the screen.
So if anything is likely to take time, you should launch another
thread to do the thinking and let the swing thread (that calls
your event handler) return to handle and required screen repaints
etc. It's basic stuff, but people seem to forget and then blame
java itself for being slow.
i also dont' understand the 3rd paragraph..

Hmm, I wonder which one that was. Perhaps ypu should experiment
with bottom-posting.

Steve
 
S

Steve Horsley

John said:
As of Java 5, you can globally enable antialiasing by defining the System
property "swing.aatext" as "true". You can do this on the launcher
command line using:

java -Dswing.aatext=true ...

You can also do it programmatically with:

System.setProperty( "swing.aatext", "true" );

In this case, you must set the property *before* any other Swing code
runs. The property is queried in a static initializer in the
SwingUtilities2 class, so once that class is referenced, changing the
property will have no effect.

Whoa! THAT one's going down in my little black book! Thanks.

Steve
 
T

Thomas Weidenfeller

Elhanan said:
i read somwhere that if you begin to sub-class gui in java you are in
trouble..

Bullshit. There are good reasons to subclass Swing/AWT components. One
is if you want to build your own reusable GUI components (JavaBeans).

/Thomas
 
T

Thomas Weidenfeller

Steve said:
You are probably better off with SWT than swing because swing has poor
fonts
and no anti-aliasing without subclassing all the components.

Some Swing PLAFs use the native fonts and the native font rasterizer.
Last time I checked, the Windows PLAF was doing this. Also, with 1.5 you
can turn on anti-aliasing globally for Swing applications, as detailed
in the comp.lang.java.gui FAQ.

/Thomas
 
K

kaeli

how can you compile a java into an exe?

With a third party application.
http://www.google.com/search?hl=en&q=java+windows+exe

Search the archives here, too. It's been discussed and I think people made
recommendations on what they liked.
i got VisualEditor plugin for eclipse, would that help?

I dunno, I don't use Eclipse.
c# has a lots of dataclasses in ado.net, JDBC seems rather limited,
right?

No, not really. The JDBC stuff itself is not made to have a ton of utilities
and classes. Classes and utilities use JDBC.
You just usually need to download free extensions (bascially, classes other
people already made) that do things.

Why, what do you think you can do with ado.net that you don't think you can
do with java? .NET is actually a huge resource hog and has a lot of cons for
its pros. IMO, the only pros it has is how easy it is for a newbie to work
with and not having to go searching around and downloading a ton of plugins
to do stuff. It's made for Windows, so it integrates very easily with
Windows.

I didn't find much else about it that stood out. But a person sure can make
an application fast whether they know a lot about it or not. However, the
application can easily turn into a resource hog that kills some people's
slower (or low-memory) systems. And, of course, it's Windows only.

(oh, and please don't top-post, it makes it hard to follow a conversation)

--
 
A

Andrew McDonagh

Thomas said:
Bullshit. There are good reasons to subclass Swing/AWT components. One
is if you want to build your own reusable GUI components (JavaBeans).

/Thomas

Whilst I agree with you, I'd assumed that the reference Elhanan read was
talking about the possibility that the Swing /SWT component may change
(behavior / appearance / serialized state etc) from one JRE release to
another, rather than any thing to do with OO problems.
 

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,982
Messages
2,570,185
Members
46,736
Latest member
AdolphBig6

Latest Threads

Top