0% found this document useful (0 votes)
5 views19 pages

Lab 2

The document outlines a series of programming assignments in Java, focusing on multithreading, basic arithmetic operations, file handling, GUI design, and user interaction. Each task includes specific requirements such as exception handling, use of Swing components, and functionality for user input. The document serves as a guide for practical exercises in Java programming.

Uploaded by

unishdhonju1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views19 pages

Lab 2

The document outlines a series of programming assignments in Java, focusing on multithreading, basic arithmetic operations, file handling, GUI design, and user interaction. Each task includes specific requirements such as exception handling, use of Swing components, and functionality for user input. The document serves as a guide for practical exercises in Java programming.

Uploaded by

unishdhonju1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 19

LAB 2

2.1 WAP in java to create multiple threads with following technique:


a) Implementing Runnable b) Extend Thread class.
Program:
Output:
2.2 WAP to take two numbers as input from user and perform Addition,
subtraction,
multiplication and division. [Catch the possible exception if any].
Program:
Output:
2.3 WAP to read the content of a file and display it.
Program:

Output:
2.4 WAP to write some content in a file.
Program:

Output:
2.5 WAP to read the content of a file and write it to another file.
Program:

Output:
2.6 Design a simple registration form using swing components. (Form should
include textfield, password field, radio button, check box, combo box, image,
and text area. Following form is just for your reference!). Additionally add two
buttons named “SUBMIT” and “CLEAR” in the form shown below. While
clicking on CLEAR button, content from all the should be erased and while
clicking on SUBMIT, all the entered data should be displayed in a separate
dialogue box.
Program:
Output:
2.7 Design a simple calculator using GUI components (pick and drop).
Calculator must perform at least all the arithmetic operations and reset
option).
Program:
Output:
2.8 WAP to implement different dialog boxes.

Output:
2.9 WAP to implement menu and popup menu option in Java.
Program:
Output:

You might also like