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 289114 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 update 2023
Main.java (text/x-java), 1.62 KB, created by
X L
on 2023-06-27 00:01:38 EDT
(
hide
)
Description:
Sample code update 2023
Filename:
MIME Type:
Creator:
X L
Created:
2023-06-27 00:01:38 EDT
Size:
1.62 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; >import org.eclipse.swt.widgets.Listener; >import org.eclipse.swt.widgets.Event; > >public class Main { > private static final class MyShell extends Shell { > private final Shell parent_; > > private void createContents() { > setSize(400, 400); > setText("Hello"); > Button button = new Button(this, SWT.NONE); > button.setText("Button"); > button.setLocation(150, 150); > button.pack(); > > addListener(SWT.Close, new Listener() { > public void handleEvent(Event event) { > parent_.close(); > } > }); > } > > public MyShell(Shell parent) { > super(parent, SWT.CLOSE | SWT.MIN | SWT.TITLE); > parent_ = parent; > 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