[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] SWT and Mac OSX problem
|
- From: javadesigner <javadesigner@xxxxxxxxx>
- Date: Sat, 26 Apr 2003 02:50:52 -0400
- Newsgroups: eclipse.tools
- Organization: EclipseCorner
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312
Hi:
I've been playing with SWT (standalone) using the latest
eclipse 2.1 release and Mac OS X Java 1.4.x.
Creating a simple shell (with SWT.SHELL_TRIM) results in
a window that is:
a) *not* resizable
b) *not* draggable/moveable.
This is very simple (missing) functionality - it's easy to replicate,
here is the entire code:
----------------
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*
public class HelloWorld {
public static void main(String[] args) {
Display display = new Display();
Shell shell = new Shell(display, SWT.SHELL_TRIM);
shell.setBounds(100,100,150,50);
shell.setText("Hi");
shell.setLayout(new GridLayout());
Label label = new Label(shell, SWT.CENTER);
label.setText("Hello, world!");
shell.open();
while (!shell.isDisposed()) {
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
}
----------------