Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Linux: Composite not complete after
Linux: Composite not complete after [message #712654] Sun, 07 August 2011 14:54
Eclipse UserFriend
Originally posted by: Thomas Barth

is this a bug or is this sourcecode wrong? In my application I need a
main composite with layout data "GridData(GridData.FILL_BOTH)". But on a
linux system since Ubuntu 10.04 it s not complete after has
been called and when one item exists in a menu. When I resize the shell
with the mouse the composite is complete as expected for
GridData.FILL_BOTH! This problem doesnt exists on a Windows system or on
a Linux system without an menuitem.

public class Snippet {

public static void main (String [] args) {
Display display = new Display ();

Shell shell = new Shell (display);
shell.setLayout(new GridLayout());
shell.setSize(400, 300);

Menu bar = new Menu (shell, SWT.BAR);
shell.setMenuBar (bar);

//An item in the menu causes incomplete compsite
MenuItem item1 = new MenuItem (bar, SWT.CASCADE);
item1.setText ("System");

Composite contentPanel = new Composite (shell, SWT.BORDER);
contentPanel.setLayout(new StackLayout());
contentPanel.setLayoutData(new GridData(GridData.FILL_BOTH)); ();

while (!shell.isDisposed ()) {
if (!display.readAndDispatch ()) display.sleep ();

display.dispose ();
Previous Topic:OS X: tables with alternating background color
Next Topic:Apply button working in real time
Goto Forum:

Current Time: Thu Feb 25 06:11:49 GMT 2021

Powered by FUDForum. Page generated in 0.01220 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top