Rockie
Rockie

Reputation: 58

SWT or Swing for Plugin Project

I'm creating a plugin project that will have a menu and toolbar item, that when clicked, will open a dialog for user interaction (input, searching, etc.). Should I create the dialog using SWT or Swing?

Upvotes: 2

Views: 928

Answers (4)

Eugene Ryzhikov
Eugene Ryzhikov

Reputation: 17359

One advantage of doing it in Swing is that you don't have to supply any other libraries, because Swing is part of JRE. With SWT you have to do it and you have to have separate dlls for specific platforms. UPDATE: Since you mentioned that you have to create Eclipse plugin, I think you have a clear choice here - SWT. It is what Eclipse is based on.

Upvotes: 5

Andy Thomas
Andy Thomas

Reputation: 86411

SWT.

Debate over the merits of Swing and SWT is irrelevant. Your plug-in will integrate with a platform built on SWT. Using the same user-interface toolkit will simplify your development and testing, and produce better results.

There are cases where it's useful to use Swing within Eclipse, such as when you have an existing codebase that would be impractical to port. There is an SWT/AWT bridge; I have not used it.

Upvotes: 3

Powerlord
Powerlord

Reputation: 88796

Since you're integrating Code Barrel into Eclipse, and SWT is part of the Eclipse project...

Actually, you should be looking at the Eclipse Plug-in Architecture and see how it works.

Upvotes: 1

trashgod
trashgod

Reputation: 205785

Like @eugener, I prefer Swing to SWT, but both are rich, well-maintained frameworks that will serve the purpose. NetBeans and Eclipse are widely used exemplars. SWT binaries for popular platforms aren't too hard to integrate. The SWT FAQ may offer some perspective.

You'll need some other criteria to decide.

Upvotes: 1

Related Questions