Java

Java JToolBar Example

In this example we are going to see how to use Java JToolBar Example.

Java Code:




Output:

A toolbar provides users with common used features of application. We usually place a toolbar directly below the menu bars at the top of a frame. A toolbar acts as a container for other components including button, combobox and menu.

In order to create a toolbar in Java Swing, you use JToolBar class. The JToolbar class supports two orientations: vertical and horizontal. You use the orientation attribute to maintain the current orientation of the toolbar.

Leave a Comment