Package javax.swing

Examples of javax.swing.DefaultListModel.trimToSize()


  {
    harness.checkPoint("trimToSize()");
    DefaultListModel m1 = new DefaultListModel();   
    m1.addElement("A");
    m1.addElement("B");
    m1.trimToSize();
    harness.check(m1.capacity(), 2);
   
    DefaultListModel m2 = new DefaultListModel();
    m2.trimToSize();
    harness.check(m2.capacity(), 0);
View Full Code Here


    m1.addElement("B");
    m1.trimToSize();
    harness.check(m1.capacity(), 2);
   
    DefaultListModel m2 = new DefaultListModel();
    m2.trimToSize();
    harness.check(m2.capacity(), 0);
  }

}
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.