View RSS Feed

My Java Tips

  1. SWT Button

    by , 11-10-2011 at 05:44 PM (My Java Tips)
    Button is a selectable user interface object that issues notification when pressed and released. It is a widget that is clicked by the user in order to initiate some processing.


    The following are the important constructors of Button class.

    Button(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 methods of Button class. ...
    Categories
    SWT / JFace
  2. 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