View RSS Feed

Recent Blogs Posts

  1. Use Lists instead Arrays in Generics

    by , 11-30-2011 at 12:20 AM
    Generics were added to java in release 1.5. It allows you to avoid needing to cast objects as they are read from a collection. Instead you tell the compiler what types of objects that you want to hold in the collection. Often it is difficult to know which generic to use when you have two or more who seem to be able to complete the same function. Consider the choice between whether to use a list or an array. Now a key thing to remember is that arrays are covariant and know and enforce their element ...
  2. SWT List

    by , 11-10-2011 at 07: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 ...
    SWT / JFace