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 287588 Details for
Bug 577515
[Wayland] Ubuntu 21.10 Window size is not correct + Gtk-CRITICAL assertion 'GTK_IS_WIDGET (widget)' failed
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Sample code
Main.java (text/x-java), 1.31 KB, created by
X L
on 2021-11-29 05:02:46 EST
(
hide
)
Description:
Sample code
Filename:
MIME Type:
Creator:
X L
Created:
2021-11-29 05:02:46 EST
Size:
1.31 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.widgets.Button; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; > >public class Main { > private static final class MyShell extends Shell { > private void createContents() { > setSize(1000, 1000); > setText("Hello"); > Button button = new Button(this, SWT.NONE); > button.setText("Button"); > button.setLocation(50, 50); > button.pack(); > } > > public MyShell(Shell parent) { > super(parent, SWT.CLOSE | SWT.MIN | SWT.TITLE); > setLayout(null); > createContents(); > } > > @Override > protected void checkSubclass() { > // Disable the check that prevents subclassing of SWT components > } > } > > public static void main(String[] args) { > System.out.println("SWT.getVersion(): " + SWT.getVersion()); > > Display display = new Display(); > Shell shell = new Shell(display); > //shell.setText("SWT Browser Test"); > //shell.setLayout(new FillLayout()); > > MyShell myShell = new MyShell(shell); > myShell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > 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 577515
:
287587
| 287588 |
287589
|
289114