Generate Random Numbers

The Math class provides the random method. The random method generates a double value greater tha or equal to 0.0 but less than 1.0.

Drop down Menu

Menus are an integral part of GUI(Graphical User Interface). Menus allow the user to perform actions  with extra GUI components. In Swing GUIs, menus can only be attached to objects of the classes that provide method setJMenuBar.

How to create simple table in Java Swing

A Table is used to display data in the form of rows and columns. It can allow editing of data which is optional. By default, the columns of a table can be resized.

Add or Remove an item in a JComboBox

In JCombobox the selected text is displayed in the text field.The Swing JCombo will automatically add scroll bar.  combo_b.removeItemAt(0) is used to remove elements (specified item) from the list.

Swing JTextArea Class

JTextArea is section of the JTextComponent. It includes the component named as JTextArea. The JTextArea component is used to display plain text and is a multi-line textarea. It is known as lightweight component for working with text.

Page 2 of 12