Donnerstag, Juni 07, 2007

waiting for swt+java3d+mac os

I just don't know the state of development, but when you come across

2007-06-07 01:28:01.528 java[655] [Java CocoaComponent compatibility mode]: Enabled
2007-06-07 01:28:01.528 java[655] [Java CocoaComponent compatibility mode]: Setting timeout for SWT to 0.100000

when trying out a java3d applet on yout SWT eclipse environment on Mac OS, maybe the applet frame stays in background and is waiting for nothing....

My solution for this is just appending a litte Code for a SWT Shell after the

  • new MainFrame(damn hot code, 700, 700);

  • if(System.getProperty("").equalsIgnoreCase("MAC OS X")){

    Display display=Display.getDefault();
    Shell shell=new Shell();

    shell.setLocation(550, 50);
    shell.setLayout(new GridLayout());
    Button b=new Button(shell,SWT.NONE);
    b.addSelectionListener(new SelectionListener(){
    public void widgetDefaultSelected(SelectionEvent e) {
    public void widgetSelected(SelectionEvent e) {
    shell.setSize(shell.computeSize(SWT.DEFAULT, SWT.DEFAULT));

    while (!shell.isDisposed()) {
    if (!display.readAndDispatch())


    Keine Kommentare: