You are here:   HomeJava ProgrammingSwingJava - List - Select Multiple items Example
by Dinesh Thakur Category: Swing

As a group of radio buttons, a drop-down list is a form of forcing the user to select only one element of a group of possibilities. However, it is a more compact way to do this, and is easier to change the elements of the list without surprising the user.

 
by Dinesh Thakur Category: Swing

A list components allows user to select a single or multiple items from a given list of items by clicking on each. By default, a user can select multiple items, however it is also possible to create a list from which user can choose only a single item.

 
by Dinesh Thakur Category: Swing

Progress indicators or progress bars are the new controls that give the users some indications of the progress of an operation. When we call JProgressBar, we can set the maximum and minimum value for the progress bar.

 
by Dinesh Thakur Category: Swing

The SpringLayout layout manager is for a GUI's components to maintain their position relative to container edges or the edges of the other components after the GUI is resized. The SpringLayout layout manager lays out its container components according to a set of constraints specified by the user. Each constraint represented by a Spring object, controls the vertical or horizontal distance between two component edges. The edges can belong to the container itself or to any child of the container.

 
by Dinesh Thakur Category: Swing

Key events occur when a key is pressed, released or typed on a component. Objects representing key events are created from KeyEvent class. The corresponding listener interface for KeyEvent class is KeyListener. Each listener for KeyEvent should implement the KeyListener interface. The KeyListener interface defines three methods.

 
by Dinesh Thakur Category: Swing

A panel in swing is similar to Panel in AWT, is a lightweight container that is designed to group a set of components, including other panels. It is visually represented as window that does not contain a title bar, menu bar or border. It is simplest of all the containers. Its default layout manager is FlowLayout.

 
by Dinesh Thakur Category: Swing

The java.awt.event.TextListener interface allows to react to changes the text contained in components of type TextField and TextArea. The addTextListener () method enables a text component to generate user events. the method TextValueChanged () receives events.



 
by Dinesh Thakur Category: Swing

In this Example, Calendar class is an abstract class present in java.util package. getInstance method is a static method of Calendar class. This method is used to create the object of Calendar class. Return type of this method is Calendar class object. Syntax-public static Calendar getInstance (). get method is a predefined method of Calendar class. It is used to return the value of a given calendar field. Return type of this method is int type. Syntax-public int get (int)



 
by Dinesh Thakur Category: Swing

JTabbedPane : Set multiple tabbed sheets, which may contain other components. The user can select the sheet you want to see by tabs.

With the JTabbedPane class, we can have several components (usually objects JPanel) sharing the same space. The user can choose which component see selecting the tab of the desired component.

 
by Dinesh Thakur Category: Swing

A combo box is a combination of a list component and text field component. It can consist of more than one item, however, displays only one item at any point of time. It also allows user to type their selection. Unlike list component, combo box allows user to select only one item at a time. A combo box is an object of JComboBox class.

 

Page 1 of 16



Subscribe To Free Daily Newsletter!

Get Free News Updates Delivered Directly To Your Inbox
About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to contact us.



What's New and Popular





Popular Article