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 swt.jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "swt.jar" Watch "swt.jar" New topic


Kee Kee moon
Ranch Hand

Joined: Dec 11, 2009
Posts: 147
This is the first time I use SWT, please see the following program.
I don't have swt.jar in my system. Would anyone instruct me how to make it work. I know I need swt.jar in my system. Where can I download the jar file and
how to install it.
Thanks in advance.

import org.eclipse.swt.widgets.*;
import org.eclipse.swt.*;
public class SWTHello {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display);
Label label = new Label(shell, SWT.NONE);
label.setText("Hello, World!");
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10825

Please UseCodeTags

More details about SWT can be found here

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
I agree. Here's the link:
subject: swt.jar
It's not a secret anymore!