Java swing tutorial: Learning JList with code example

Tutorials Shared by the Internet Community

Advertisements


Synopsis

In this java swing JList tutorial we will learn important properties and function of JList while working on task with examples. In my opinion best way

Statistics

  • Total Hits - 27465

  • Total Votes - 96 votes

  • Vote Up - 41 votes

  • Vote Down - 55 votes

  • Domain - javarevisited.blogspot.com

  • Category - JAVA/Core JAVA

  • Submitted By - Javin Paul

  • Submitted on - 2011-08-10 14:47:03

Description

In this java swing JList tutorial we will learn important properties and function of JList while working on task with examples. In my opinion best way to learn swing is to actually doing task and so I designed this tutorial around task. We will start with simple example and proceed with more complex one step by step adding new functionality and in the course we will learn JList both concept and API. In this first example we need to implement a list which shows names of companies in sorted order. Before start coding let's see some fundamentals of JList:
1) JList is a GUI element available in javax.swing package which allows selection of one more element. Internally JList is backed up by two models: ListModel for holding data and ListSelectionModel for handling selection. JList also allows custom rendering via ListCellRenderer which can be used to draw a specific cell in customize manner. ...


Site  |   Broken  |   Tweet  |   Facebook  |     |   Save  |   Liked  |   Down

Advertisements