aspose file tools*
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
Author

swt.jar

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!");
shell.pack();
label.pack();
shell.open();
while(!shell.isDisposed())
if(!display.readAndDispatch())
display.sleep();
display.dispose();
label.dispose();
}
}
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10375
    
    8

Please UseCodeTags

More details about SWT can be found here
http://www.eclipse.org/swt/faq.php


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: swt.jar