Java Tutorial

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.

 
 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing

JApplet is a class that represents the Swing applet. It is a subclass of Applet class and must be extended by all the applets that use Swing. It provides all the functionalities of the AWT applet as well as support for menubars and layering of components. Whenever we require to add a component to it, the component is added to the content pane.

 
 
by Dinesh Thakur Category: Swing
 
 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing

The RoundRectangle2D class lets you draw a rectangle with corners rounded. The construction of the box is identical to that made ​​with the class Rectangle2D, the only difference in this case are two additional parameters to end of the constructor, which indicate the width and length of the curve defining each corner. The larger these values ​​will have higher level of rounding the corners.

 
 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing

A button, also known as push button, is an active control that has a 3-dimensional appearance. It triggers an event when it is clicked or activated. Swing also provides an ability to associate an icon, a string, or both with the buttons. A push button is an object of JButton class.

 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing

A menu bar represents a list of menus which can be added to the top of a top-level window. Each menu is associated with a drop-down list of menu items. The concept of menu bar can be implemented by using three Java classes: JMenuBar, Menu and JMenuitem. A menu bar is represented by the object of class JMenuBar in which only the default constructor is defined. A menu bar may consist of one or more menus represented by the objects of the class JMenu. A menu contains a list of menu items represented by the objects of the class JMenuitem.

 
by Dinesh Thakur Category: Swing

JMenuBar, which is a drop down menu bar at the top application, and JPopupMenu, a menu you get when you press the button right mouse on a particular area. The menus are comprised of different items:

 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing
 
by Dinesh Thakur Category: Swing

A scroll pane is a container that represents a small area to view other component. If the component is larger than the visible area, scroll pane provides horizontal and/or vertical scroll bars automatically for scrolling the components through the pane. A scroll pane is an object of the JScrollPane class which extends JComponent.

 
by Dinesh Thakur Category: Swing
 


About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular 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.