Which is...



Sense and purpose

JList2D is the result of the search for a Swing component, which is to fulfil the following demands:

The result...

... the Swing component JList2D presented here.
Apart from the demands specified above JList2D has the still following characteristics:

How is JList2D used?

The following code fragment is taken from that the demo code:

  :
  // produce the Object and set the data model JList2D
  jList2D = to new JList2D ();
  jList2D.setModel (getListModel (false));
  // set number of fixed spades
  jList2D.setFixed (3);

  /** a data model for JList2D supplies */
  public DefaultListModel getListModel (boolean empty) {

    DefaultListModel dlm = new DefaultListModel ();
    if (! empty) {
      for (int x = 0; x < mclData.length; x++) {
        dlm.addElement (mclData [x ]);
      }
    }
    return dlm;
  }