|
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.ProgressBar;
import org.eclipse.swt.widgets.Shell;
public class MainClass {
public static void main(String[] a) {
Display display = new Display();
Shell shell = new Shell(display);
shell.setLayout(new GridLayout());
// Create an indeterminate progress bar
ProgressBar pb2 = new ProgressBar(shell, SWT.HORIZONTAL | SWT.INDETERMINATE);
pb2.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch()) {
display.sleep();
}
}
}
}
|
Tags: Code, Java by API, new ProgressBarShell shell, org.eclipse.swt.widgets, ProgressBar, ProgressBar laquo orgeclipseswtwidgets laquo Java by API, SWTHORIZONTAL SWTINDETERMINATE
Posted in Uncategorized |
This entry was posted
on Saturday, July 4th, 2009 at 6:00 am and is filed under Uncategorized.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.