In this section, you will study how to create a Sash
In SWT, the class Sash represent a selectable user interface object that allows the user to drag the outline. We have create the Sash first, so that the controls can be attached to it. We have used the class FormData to define the attachments of a control in a FormLayout. To set the FormData into control, we have used the method setLayoutData() and pass the object of this class to the method.
Create the first text box and attach its right edge to the sash. Then create second text box and attach its left edge to the sash.The sash is in between the text boxes.
Here is the code of SashExample.java
Output will be displayed as:
If you enjoyed this post then why not add us on Google+? Add us to your Circles
Liked it! Share this Tutorial