You are on page 1of 4

Practical No.

9:
Write a program to launch a JProgressBar.
Program Code:-
1. Write a program code to generate the following output.
Ans. Program Code:-

Output:-

Practical Related Questions:-


1. Name different Orientation of Progress Bar.
Ans. There are two types of orientation of Progress Bar.
1. HORIZONTAL ORIENTATION(DEFAULT ORIENTATION).
2. VERTICAL ORIENTATIO.
2. Explain the Purpose of setValue().
Ans. The setValue() method in org.javatuples is used to set the value in the
LabelValueClassObject or KeyValueClassObject. This method can be used with
only LabelValue class or KeyValue class of javatuples library. It returns another
ClassObject with the value as the element passed as the parameter, and the
key or label from the previous ClassObject.

3. What is the use of minimum and maximum value of progressbar?


Ans. The Minimum and Maximum properties are used to set the minimum and
maximum values that the progress bar can display. The Value property specifies
the current position of the progress bar.

Exercise:-
1. Develop a program to demonstrate the use of JProgressBar.
Ans. Program Code:-

Output:-
2. Write a Program using JProgressBar to show the progress of Progressbar when
user clicks on JButton.
Ans. Program Code:-

Output:-
******

You might also like