SWT problem

zhaozj2021-02-16  52

In the Apple machine, the picture is developed with IBM's SWT, and the code is as follows:

Import org.eclipse.swt.widgets. *; import org.eclipse.swt. *;

Public class hello {

Public static void main (string [] args) {Display Display = new display (); shell shell = new shell (label label = new label (shell, swt.none); label.settext ("Hello, World! "); Shell.pack (); label.Pack (); shell.Open (); while (! Shell.iedisposed ()) {if (! Display.readanddispatch ()) {display.sleep ();} system. Out.println ("OK");} system.out.println ("end"); display.dispose (); label.dispose (); system.out.println ("all dispose");}}

Description:

Put the libswt-carbon-3061.jnilib, libswt-pi-carbon-3061.jnilib libswt-webkit-carbon-3061.jnilib java_swt: ilbrary: java: extensions: directory

Then put the swt.jar swt-pi.jar hello.class in the same class directory.

Next, enter the Hello.Class directory Enter java -classpath swt.jar wt-pi.jar: Hello under the control stage

The result picture cannot be moved. Why is that?

What is the method, let it move.

THank you for everyones suggestions.

转载请注明原文地址:https://www.9cbs.com/read-18263.html

New Post(0)