Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] SWT on top of swing?

Michael,

NetAmie is a project on java.net which abstracts out SWT and Swing for the application (also AWT, Flash, and Conga and OpenGL). The application will not care whether it is Swing or SWT. Therefore, you remove your application dependency on the specific tool kit.

You have an interface contract which abstracts out the details of the graphics implementation. Think JDO which abstracts out the specific persistence store.

The project is https://netamie.dev.java.net/ . Look forward to your comments or participation.

Kindest,

Lane



Michael Scharf wrote:

Hi,

Would it make sense to build a SWT on the "swing platform"?
What are the reasons not to try to port SWT to swing?

I have asked this question about 2 years ago.
  http://dev.eclipse.org/newslists/news.eclipse.tools/msg03472.html]

I want to restate the question, because swing became faster
with the newest jdk and there are so many questions and
requests for SWT-swing interoperability. And it seems
quite difficult to get a SWT-swing interoperability to
run on all platforms.

I know that this would undermine the basic SWT design,
  http://eclipse.org/articles/Article-SWT-Design-1/SWT-Design-1.html
but I beleive that the widgets and the model provided
by SWT are valuable even if the implementation below
is swing (because I think the abstractions that SWT
provides are better than the swing abstractions).

Under the pressure of SWT, swing has become better
and more native looking with version 1.4.2. However
the SWT versus swing devides the java world...

There is an explosion in complexity when adding new
widgets to SWT (or to enhancing the behavior of existing
widgets), because this has to be ported to all supported
platforms.

For example: a scalable (virtual) table is not easy
to build because this requires knowledge in all
supported native toolkits.
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=15054
  https://bugs.eclipse.org/bugs/show_bug.cgi?id=36226

The nice concept of SWT becomes a nightmare the more
native platforms are supported. And without an extensive
hardware and software setup it is not possible to even add
or modify the simplest widget in a way that works on all
supported platforms.....

I know that emulation versus native is a religious
question and I don't want to start a debate on this.
But sticking with the "native" model: why not using
swing as "native" platform?

Like on windows where Active-X components can be
used, on the "swing-platform" swing components
could be used....


Michael


--
Lane Sharman
Just Do IT, Better.
858-755-2868





Back to the top