File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Swing / AWT / SWT and the fly likes Java2D in SWT/JFace Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Java2D in SWT/JFace" Watch "Java2D in SWT/JFace" New topic

Java2D in SWT/JFace

G Vigna

Joined: Jun 01, 2005
Posts: 11

I am working in migrating from Swing to SWT. Some part of the existing application has Java2D contents (diagrams). Is it possible to reuse the Java2D part in SWT?

Expecting feedback

Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

It's possible to use Swing components within your SWT application, although last time I checked this worked only on Windows, and was supported only in an internal package. But they were working on making it an exported API and also giving it cross-platform support.

Search for the Eclipse API class named "SWT_AWT" to check its current status.

[Jess in Action][AskingGoodQuestions]
G Vigna

Joined: Jun 01, 2005
Posts: 11
Thanks. I shall look into SWT_AWT.
It is sorta covered in the JavaRanch Style Guide.
subject: Java2D in SWT/JFace
It's not a secret anymore!