Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 18217 Details for
Bug 86145
VM Crash when running remotely via cygwin/X
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
Modified simple Hello program for testing
Test.java (text/plain), 1.96 KB, created by
David Martinez
on 2005-02-22 16:19:07 EST
(
hide
)
Description:
Modified simple Hello program for testing
Filename:
MIME Type:
Creator:
David Martinez
Created:
2005-02-22 16:19:07 EST
Size:
1.96 KB
patch
obsolete
>import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.SWT; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Event; >import org.eclipse.swt.widgets.Label; >import org.eclipse.swt.widgets.Text; >import org.eclipse.swt.widgets.Listener; >import org.eclipse.swt.widgets.Shell; > >public class Test >{ > > public static void main(String[] args) > { > for (int i=0; i<10000; i++) > { > new Test().run(); > if ((i%100)==0) > { > System.out.println("Iteration " + i); > } > } > } > > private void run() > { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setBounds(100,100,150,50); > shell.setText("Hi"); > shell.setLayout(new GridLayout()); > Label label = new Label(shell, SWT.CENTER); > label.setText("Hello, world, how is it going?!"); > Text textArea = new Text(shell, SWT.BORDER | SWT.CENTER); > textArea.setText("Edit Me!"); > shell.setBounds(0, 0, 100, 100); > shell.addListener(SWT.Resize, new Listener() { > > public void handleEvent(Event arg0) > { > // TODO Auto-generated method stub > System.out.println("Resizing event"); > > }} ); > shell.addListener(SWT.Close, new Listener() { > public void handleEvent(Event evt) { > System.out.println("Closing"); > } > }); > shell.setBounds(30, 0, 100, 100); > shell.open(); > /* > for (int i=0; i<20; i++) > { > shell.setVisible(false); > display.readAndDispatch(); > shell.setVisible(true); > display.readAndDispatch(); > } > */ > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > { > shell.close(); > display.sleep(); > } > } > display.dispose(); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 86145
: 18217