View RSS Feed

Recent Blogs Posts

  1. Performance issues related to Look and Feel of GUI

    by , 11-19-2011 at 06:15 PM (My Java Tips)
    When you use Java Swing or Java Foundation Classes (JFC) for your GUI application development the look and feel of GUI application is not the same as the look and feel of your operating system as JFC or Java Swing has its own built in look and feel. Although, if you want you can achieve the same look and feel as of your operating system's by using Java's Abstract Window Toolkit (AWT), the AWT toolkit is unable to meet advanced GUI programming requirement.


    The Java Foundation Classes ...
    Tags: awt, java swing, jfc, swt Add / Edit Tags
    Categories
    Performance
  2. Introduction to Standard Widget Toolkit

    by , 11-10-2011 at 06:18 PM (My Java Tips)
    AWT (the Abstract Windowing Toolkit) was the first Java GUI toolkit, introduced with JDK 1.0 as one component of the Sun Microsystems Java standard. The relatively primitive AWT wrapped Java code around native (operating system-supplied) objects to create GUI elements, such as menus, windows and buttons. AWT was a very thin wrapper around native widgets, exposing developers to platform specific code, quirks and bugs that limited how portable and native-looking applications could be across different ...
  3. SWT Text

    by , 11-10-2011 at 06:12 PM (My Java Tips)
    Text is a selectable user interface objects that allow the user to enter and modify text. Events associated with Text are: DefaultSelection, Modify, Verify. Different Text styles are CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP. Please note that only one of the styles MULTI and SINGLE may be specified.


    The following are the important constructors of Text class.

    Text(Composite parent, int style)
    Constructs a new instance of this class given its ...
  4. SWT Menu

    by , 11-10-2011 at 06:10 PM (My Java Tips)
    Menu are user interface objects that contain menu items. The Menu support styles BAR, DROP_DOWN, POP_UP, NO_RADIO_GROUP, LEFT_TO_RIGHT, RIGHT_TO_LEFT. Please note that only one of BAR, DROP_DOWN and POP_UP may be specified. Only one of LEFT_TO_RIGHT or RIGHT_TO_LEFT may be specified.


    The following are the important constructors of Menu class.

    Menu(Control parent)
    Constructs a new instance of this class given its parent, and sets the style for the instance so ...
    Tags: menu, menu items, swt Add / Edit Tags
    Categories
    SWT / JFace
  5. SWT List

    by , 11-10-2011 at 06:07 PM (My Java Tips)
    List is a selectable user interface object that displays a list of strings and issues notification when a string selected. A list may be single or multi select. Events associated with List are Selection, DefaultSelection. Please note that only one of SINGLE and MULTI style may be specified.


    The following are the important constructors of List class.

    List(Composite parent, int style)
    Constructs a new instance of this class given its parent and a style value describing ...
    Categories
    SWT / JFace
  6. SWT Label

    by , 11-10-2011 at 06:02 PM (My Java Tips)
    A label displays a string or an image. The string can be changed by the application, but a user cannot edit it directly. For Label, when SEPARATOR is specified, displays a single vertical or horizontal line.


    The following are the important constructors of Label class.

    Label(Composite parent, int style)
    Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

    The following are the important ...
    Tags: label, separator, swt Add / Edit Tags
    Categories
    SWT / JFace
  7. SWT Group

    by , 11-10-2011 at 05:59 PM (My Java Tips)
    A group is also a control that can contain other controls. A group is surrounded by a border and may, optionally, contain a title. As with composites, the position of each control inside a group is relative to the group, so if the group is moved on the shell, the controls inside the group retain their relative positions.


    Group provide an etched border with an optional title. Shadow styles are hints and may not be honored by the platform. To create a group with the default shadow style ...
    Tags: control, group, swt Add / Edit Tags
    Categories
    SWT / JFace
  8. SWT Dialog

    by , 11-10-2011 at 05:57 PM (My Java Tips)
    Dialog class is the abstract superclass of the classes that represent the built in platform dialogs. A Dialog typically contains other widgets that are not accessible. A Dialog is not a Widget.


    This class can also be used as the abstract superclass for user-designed dialogs. Such dialogs usually consist of a Shell with child widgets. The basic template for a user-defined dialog typically looks something like this:

    Java Code:
     import org.eclipse.swt.*;
     import org.eclipse.swt.widgets.*;
    ...
    Tags: dialog, subclass, swt Add / Edit Tags
    Categories
    SWT / JFace
  9. SWT Composite

    by , 11-10-2011 at 05:53 PM (My Java Tips)
    Composite are controls which are capable of containing other controls. Controls are placed inside a composite in the same manner that Controls are placed on a shell. The position of each widget inside a composite is relative to the composite, so if the composite is moved on the shell, the Controls inside the composite retain their relative positions.


    The styles supported by composites are NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, NO_REDRAW_RESIZE, NO_RADIO_GROUP, EMBEDDED, DOUBLE_BUFFERED. ...
    Categories
    SWT / JFace
  10. SWT Combo

    by , 11-10-2011 at 05:50 PM (My Java Tips)
    Combo are controls that allow the user to choose an item from a list of items, or optionally enter a new value by typing it into an editable text field. Often, Combos are used in the same place where a single selection List widget could be used but space is limited. A Combo takes less space than a List widget and shows similar information.


    The following are the important constructors of Combo class.

    Combo(Composite parent, int style)
    Constructs a new instance ...
    Tags: combo, controls, swt Add / Edit Tags
    Categories
    SWT / JFace
  11. SWT Canvas

    by , 11-10-2011 at 05:47 PM (My Java Tips)
    Canvas provide a surface for drawing arbitrary graphics. It supports no styles and events. This is a subclass of class Composite.


    This class may be subclassed by custom control implementors who are building controls that are not constructed from aggregates of other controls. That is, they are either painted using SWT graphics calls or are handled by native methods.

    The following are the important constructors of Canvas class.

    Canvas(Composite parent, ...
    Tags: canvas, swt Add / Edit Tags
    Categories
    SWT / JFace
  12. SWT Events

    by , 11-10-2011 at 05:41 PM (My Java Tips)
    In order to work with events in SWT, you create a listener specific to the event that you wish to capture. There is an interface for each listener that you can use (for example SelectionListener). There is also a class that will provide you with the event information (for example SelectionEvent). Within the listener that you create, you must implement the methods defined in the interface.



    Java Code:
    SelectionListener listener = new SelectionListener()
    {
    	public
    ...
    Categories
    SWT / JFace