View RSS Feed

My Java Tips

  1. The Facade Design Pattern

    by , 11-20-2011 at 07:05 PM (My Java Tips)
    The Facade Design Pattern is a structural design pattern amongst the design patterns. A facade is actually an object. It provides an uncomplicated interface to a larger body of code, for example a class library.

    As a facade has simple and tailored methods for common tasks. A facade can make a software library easier to use and understand. A facade also makes the code that uses the library more readable. A facade assists in developing a more flexible system. It reduces dependencies ...
  2. SWT Events

    by , 11-10-2011 at 06: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()
    SWT / JFace