How to Use the ButtonGroup Component in Java

JButton Group component is used to manage the Buttons. By using JButtonGroup we can select only one option at a time.Controls are components like Buttons, textboxes that can be added to container like frames,panels etc.

Changing the Column name in JTable

The JTable class is a component of Swing programming which presents the user data within a scrolltable.Changing the name of the Column in JTable we use the method ChangeName().

Draw Shapes using C Graphics

By using Graphics we can draw the geometric figures like circle, line, ellipse, bar etc.

In this we set the coordinates like leftt,top,right,bottomm.Graphics.h library is used for graphics (initgraph method).

 

JLabel in Java Swing

As frame, panels, and applets are Swing components, similarly labels are also Swing components. The idea behind using JLabel is to display an area for a short text string or an image, or both. Labels do not respond to input events;hence, JLabel does not receive the keyboard focus. The label can be aligned by setting the label’s contents using the vertical and horizontal alignment.

How to Use JList in Swing

A list is a simple presentation of choices, which are large in number. As a Swing Component, list is written as JList. The JList component is defined as a component, which provides a set of items that are scrollable, from which, one or more items may be selected.

 

Accessing Interface Variables in Java

The  variables of an interface are always declared as "final". Final variables are those variables, whose  values are constants and cannot be changed. The class that implements the interface can use the variables as declared in the interface and cannot modify or changed the value of the variable.

Two-Dimensional Arrays in Java

In Java, multi dimensional arrays are also referred to as arrays of arrays. 2D array is the commonly used and simplest multi-dimensional array. Generally ,2D arrays are referred to as one-dimensional arrays lists. 2D arrays are represented in a row-columns form on paper, and the terms "rows" and  "columns" are used in computing.

Java Break Statements

Break statement is one of the Branching statements provided by Java, which is also used to control the flow of the program. Break statement is used to exit from a running loop program on a condition that is predefined, before the loop completion.

Nested Classes in Java

A class is a framework, which represents a general objects. An instance of a class represents an individual object. The object defines the behavior and properties of the class. A nested class is a class that is defined within another class(class inside another class). Nested classes enhance the readability and maintainability of a code.

How to create User Defined Exceptions in Java

A user defined exception class should be a subclass of the Exception class. Exception are thrown with the help of the “throw” keyword.

Page 15 of 30