Lotus notes becomes unresponsive after closing swt window

Hello. I am trying to open a swt dialog from lotus notes 8.5.2 on fedora 14. The java code is run after pushing a button in lotus notes.

The code for the dialog is the following:

        Display display = new Display();



        Shell shell = new Shell( display );

        shell.setLayout( new FillLayout() );

        shell.setText( "Dialog" );

        shell.setSize( 300, 200 );

        shell.open();



        final Button button = new Button( shell, SWT.PUSH );

        button.setText( "Button" );

        button.setBounds( 20, 40, 80, 25 );



        while ( !shell.isDisposed() ) {

            if ( !display.readAndDispatch() )

                display.sleep();

        }

        display.dispose();

The problem is that after closing the swt dialog, lotus notes becomes unresponsive.

I don’t experience this problem in lotus notes, windows, for the same dialog.

Do you have any ideas what might be wrong?