1 / 5

Controls in Java (3)

Controls in Java (3). JList ( setSelectionMode , getSelectionMode getSelectedIndex , setSelectedIndex , getSelectedIndices , setSelectedIndices ; ListSelectionListner : valueChanged )

duncan
Download Presentation

Controls in Java (3)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Controls in Java (3) • JList(setSelectionMode, getSelectionModegetSelectedIndex, setSelectedIndex, getSelectedIndices, setSelectedIndices; ListSelectionListner: valueChanged) • Single-selection list (ListSelectionModel.SINGLE_SELECTION) and multiple-selection list (ListSelectionModel.SINGLE_INTERVAL_SELECTION and ListSelectionModel.MULTIPLE_INTERVAL_SELECTION), please see http://docs.oracle.com/javase/6/docs/api/javax/swing/ListSelectionModel.html

  2. An Example

  3. Strings in Java • http://java.sun.com/javase/7/docs/api/java/lang/String.html • String.format(String format, Object... args), similar to printf() in C • %d, %10d, %-10d, %010d • %s, %20s, %-20s

  4. Mid-term Exam

  5. No Meeting This Thursday • E-Day, Oct. 11, 2012, 8:30 a.m.-11:45 a.m. • Open E-day to all current students as well. • My lab – SEC 3423.

More Related