Package charvax.swing.event

Examples of charvax.swing.event.ListSelectionListener


  ListSelectionEvent event =
      new ListSelectionEvent(this, firstindex_, lastindex_, false);

  Iterator<ListSelectionListener> iter = _listeners.iterator();
  while (iter.hasNext()) {
      ListSelectionListener l = (ListSelectionListener) iter.next();

      l.valueChanged(event);
  }
    }
View Full Code Here


        jlist = new JList();
        jlist.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        jlist.setModel(new DefaultListModel());
        jlist.setVisibleRowCount(rows - 2);

        jlist.addListSelectionListener(new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent evt) {
                //Object o = list.elementAt(evt.getFirstIndex());
                int selectedIndex = jlist.getSelectedIndex();
                if ((selectedIndex >= 0) && (selectedIndex < list.size())) {    //need this check because
                    //something is screwed: sometimes strange values are returned by getSelectedIndex()
View Full Code Here

TOP

Related Classes of charvax.swing.event.ListSelectionListener

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.