SWT: group box

Source: Internet
Author: User

// Todo auto-generated method stub

// Create a panel class
// Composite = new composite (shell, SWT. None );

// Panel Style
// SWT. None No border
// SWT. Border panel without Borders
// SWT. no_radio_group pair radio button

// Common methods of panel classes
// Obtain the method control [] getchildren () for all controls in the panel ();
// Obtain the parent panel compposite getparent () of the panel ()
// Set the panel layout setlayout (layout)
// Refresh the Layout

// Selected Style Constant
// SWT. shadow_etched_in SWT. shadow_etched_out
// SWT. shadow_in shadow_out SWT. shdow_none

Display display = display. getdefault ();
Shell shell = new shell (Display );
Shell. setlayout (New filllayout (SWT. Vertical ));

// Create group dialog box
Group = new group (shell, SWT. None );
Group. settext ("group box"); // set the title

Group. setlayout (New rowlayout (); // sets the layout.
// Add button
For (INT I = 0; I <4; I ++)
{
Button button = new button (group, SWT. Push );
Button. settext ("button" + I );
}

Shell. open ();
While (! Shell. isdisposed ())
{
If (! Display. readanddispatch ())
{
Display. Sleep ();
}
}

Display. Dispose ();
}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.