-
-
Save jnthn/6e5b82c4b70fd6592841 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
constant SWTJAR = 'D:\Program Files\eclipse\plugins\org.eclipse.swt.win32.win32.x86_64_3.100.1.v4234e.jar'; | |
use org::eclipse::swt::SWT:from<java>:jar(SWTJAR); | |
use org::eclipse::swt::widgets::Display:from<java>:jar(SWTJAR); | |
use org::eclipse::swt::widgets::Shell:from<java>:jar(SWTJAR); | |
use org::eclipse::swt::widgets::Text:from<java>:jar(SWTJAR); | |
my $display := Display.'constructor/new/()V'(); | |
my $shell := Shell.'constructor/new/(Lorg/eclipse/swt/widgets/Display;)V'($display); | |
my $helloWorldTest := Text.new($shell, SWT.'field/get_NONE/I'()); | |
$helloWorldTest.setText("Hello World SWT"); | |
$helloWorldTest.'method/pack/()V'(); | |
$shell.'method/pack/()V'(); | |
$shell.open(); | |
until $shell.isDisposed() { | |
$display.sleep unless $display.readAndDispatch(); | |
} | |
$display.dispose(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment