Table of Contents
If you’re new to Java Swing:
- Getting started with Java Swing via a brief introduction to Java Swing and its architecture.
- Develop the first Swing application.
If you’re looking for a specific Swing component to learn how to work with its API, you can find each of them in the following sections:
Swing provides you various layout managers that allow you to arrange swing components inside a container. The following section provide the most commonly used swing layouts including border layout, flow layout, grid layout, grid-bag layout and card layout.
Swing offers various kinds of buttons including push button, toggle button, check box and radio button. A push button and toggle button can display text, icon or both. You will find out each kind of button in this part.
List, comboBox and spinner components
List and combobox share the same characteristics that allow user to make single or multiple choices. A spinner enables users to click and spin through a set of choices, one at a time.
The JScrollBar, JProgressBar and JSlider components use the same model named bounded-range model therefore those components are often referred as bounded-range components. In this section, we will explore the JScrollBar, JProgressBar and JSlider components in detail.
Swing provides an extensive collection of classes such as JTextField, JTextArea, JPasswordField and JEditorPane for creating text fields in the applications.
Swing allows you to create various dialog box types ranging from simple dialog with JOptionPane , JFileChooser, JColorChooser to complex one such as JDialog.
Menu and toolBar
Swing provides you with very easy to use APIs to help create flexible and popup menu. In addition, Swing also has JToolBar class that allows you to create toolbars, used in conjunction with a menu to provide users with shortcuts for the commonly used menu items.
Java Swing table
Swing provides JTable API that represents data in tabular format. With JTable component, you can display database records, stock quotes and sales data visually. In addition, the JTable component also allows you to create editable fields embedded inside its cells.