SWT

- Calendar Example
SWT allows to create Calendar by using the java.util.Calendar class.
The class CLabel allows to write the day and the days of week. The class GridLayout
provides the configuration of GridData in the layout.
- Draw Calendar in SWT
SWT allows to create Calendar by using the java.util.Calendar
class. The class CLabel draws the aligned text with different border
styles. We are using this class to write the day and the days of week.
- SWT TextEditor
In SWT, the classes ToolBar and ToolItem are allowed to create
the TextEditor. The class ToolBar provides the toolBar items and the
class ToolItem adds the item to the toolbar.
- Show different types of Cursor
Using SWT we can change the style of cursor, by using the class Cursor of package org.eclipse.swt.graphics. To
show the hand cursor, we have defined the SWT.CURSOR_HAND in the
constructor of Cursor.
- How to create Combo Box in SWT
In this example, we have created two different combo
boxes where one is performing an action on the second combo box. The items tea ,
coffee and cold drink are added to the first combo box by using the method
add() of Combo class.
- Temperature Converter in SWT
SWT provides the class ApplicationWindow of package org.eclipse.jface.window
that provides general framework for creating and managing different windows. In
this example we are going to show you how to convert the temperature.
- Rotate Text in Java
In SWT, we have used the package org.eclipse.draw2D.Graphics to draw
the figure on to the surface. The interface IFigure allows to create the
complex Graphics and the Figure class implements the Graphical figures.
- Tree Example
SWT provides a class Tree to represent the data in the hierarchical way and
TreeItem to represents the hierarchy of tree items in a tree by adding an
item to the tree.
- Create Tree in SWT
SWT allows an advantage of creating a tree. To represent the data in the
hierarchical way, the class Tree is used. It provides the hierarchy of
items.
- SWT Spinner
In SWT, the class Spinner of package org.eclipse.swt.widgets is
used. The method setMinimum() sets the minimum value and the method setMaximum()
sets the maximum value.
- Create Scale in SWT
In order to create the scale, SWT provides the class Scale of package org.eclipse.swt.widgets.*.
This class shows the different ranges of numeric values.
- Create Radio Buttons in SWT
In SWT, the style RADIO defined in the Button class allows to create radio
button. We have create an array object of Button class. The class Label
displays the specified string.
- Create Progress Bar in SWT
SWT allows to create a Progress bar by providing the class ProgressBar
of package org.eclipse.swt.widgets. With the use of this class, you can
display the progress in the form of bar.
- Create Menu Bar in SWT
In SWT, the classes Menu and MenuItem of package org.eclipse.swt.widgets is
allowed to create a menu bar. The method setMenu() sets the pull down
menu.
- Create Popup List in SWT
SWT allows to create the popup list by providing the class PopupList
of package org.eclipse.swt.custom. In the given example, we are going to
popup the list of Indian states.
- Login Form in SWT
To create a login form in SWT, the Label class set the labels User
Name and Password and Text class sets the text for the specified fields. The
method shell.setLayout(new GridLayout(2, false)) sets the layout of
the login form.
- How to create Link in SWT
SWT allows to create link by using the class Link of package org.eclipse.swt.widgets.
The class Link displays the specified text with links. The method setText(message)
sets the text specified.
- Use Group Class in SWT
In SWT, the class Group of package org.eclipse.swt.widgets
provides an etched border with an optional title. In the given example, we have
create two groups by using the class Group.
- Draw a Flowchart
To draw a flowchart, we have used the package org.eclipse.draw2d.* and
org.eclipse.swt.*. The Shell class provides the shell on which the flowchart is
displayed.
- Drag and Drop Example in SWT
In SWT, the class DND provides all the constants to drag the source and drop.
The class DragSource defines the source for drag transfer. The method setTransfer()
sets the text to be transferred by the DragSource.
- Show Font Dialog and Color Dialog
SWT allows to show Color Dialog and Font Dialog by providing the
classes FontDialog and ColorDialog. The FontDialog class
provides the font dialog and allow the user to select a font from the available
fonts.
- Creating List in Java using SWT
In this example, we have create a list of certain items using SWT that
provides the class List of package org.eclipse.swt.widgets to
create the list in Java language.
- Create Scroll Bar in Java using SWT
The given example will show you how to create scroll bar in Java using SWT,
for that we have created a class with the name ScrollBarExamle that
imports a package org.eclipse.swt.widgets, which is used to create ScrollBar in Java.
- Create ToolTip Text in SWT
The ToolTip is the element of graphical user interface used in the
conjunction with a cursor pointer. In SWT, the method setToolTipText() of
class TabItem sets the tooltip text. In the given example, we have create
tabs using the class TabFolder and TabItem to show the toolTipText.
- Create Tabs in Java using SWT
This Tab Example in Java, will teach you how to create tabs using SWT in
Java. After going through the example you will be able to create different tabs
with different values on the same page. Just follow the given instruction.
- SWT Browser
In SWT, the class Browser of package org.eclipse.swt.browser allows to
create a browser. In the given example, the class Browser implements the browser and allows the user to
navigate through HTML documents.
- Create Expand Bar in SWT
SWT provides an application of creating a Expand Bar using the classes
ExpandBar and ExpandItem. The class ExpandBar provides the
layout of selectable expand bar items.
- SWT File Browser
This section illustrates you how to browse a file.
- Use of ColorRegistry and FontRegistry
This section illustrates you the use of ColorRegistry and FontRegistry.
SWT provides a great application of ColorRegistry and
FontRegistry.
These are the classes of package org.eclipse.jface.resource.
- Create a Sash in SWT
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.
- Create a Sash Form
In this section you will study how to create a Sash Form. In
SWT, the class SashForm lays out a Row or Column arrangement (as
specified by the orientation) and places a Sash between them.
- StyledText in SWT
This section illustrates you how to create a Styled
Text. To display the stylish and impressive text, we have used the class StyledText
of package org.eclipse.swt.custom.
- Create Table in SWT
In this section, you will study how to create a table.
SWT provides the classes Table, TableItem, TableColumn
of package org.eclipse.swt.widgets to create a table.
- Demonstrates TableTree
This section shows you Table Tree. SWT provides the class TableTree to display the hierarchy of items in
a tabular form.
- Create a ToolBar
This section illustrates you how to create a ToolBar in SWT.
The method setBounds()
sets the size and location of toolBar.
- Use of PreferenceStore class
This section demonstrates you the use of class PreferenceStore.
SWT provides the class PreferenceStore to persist the non-default
values to the files or streams and to load the default values from the file or
streams.
- Demonstrates Wizard
This section illustrates you how to implement the wizard.
In SWT, the class WizardDialog shows a wizard to the user.

|