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

Java Lab Assignment - GUI & Event Handling - SR

The document outlines a Java lab assignment focused on creating GUI applications and handling events. It includes tasks such as creating frames, implementing various layouts, adding components like buttons and labels, and developing functionality for a temperature converter. Each task emphasizes different aspects of GUI programming using Java's Frame and JFrame classes.

Uploaded by

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

Java Lab Assignment - GUI & Event Handling - SR

The document outlines a Java lab assignment focused on creating GUI applications and handling events. It includes tasks such as creating frames, implementing various layouts, adding components like buttons and labels, and developing functionality for a temperature converter. Each task emphasizes different aspects of GUI programming using Java's Frame and JFrame classes.

Uploaded by

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

Java Lab Assignment: GUI and Event Handling

1. Write a java (GUI) program to create an empty Frame. Set the title of the frame to "My First GUI
Frame". The frame is initially invisible and must be made visible by invoking its "setVisible()"
method. Using (a) Frame class, (b) JFrame class, and (c) Extends from JFrame.

2. Write a java (GUI) program to create (and to display) two frames. One frame is the "master" frame.
Click its close button, and everything closes down. The other frame is temporary. Click its close
button, and only it is closed.

3. Write a java (GUI) program to create label, button and textbox into a frame using (a) JFrame class
and the following layout, and (b) Frame class and the following layout.
a) Default Layout
b) Flow Layout
c) Border Layout
d) Grid Layout
4. Write a java (GUI) program to create MenuBar, Menus and MenuItem into a frame.

5. Write a java (GUI) program to create Radio Buttons, Combo box and Check Boxes. Also create two
panels which include those Radio Buttons, Combo box and Check boxes.

6. Write a java (GUI) simple program as following specification:


There will be one text box, one command button. User will click on command button, the number
will increment into the textbox.
7. Write a java (GUI) simple program as following specification:
There will be two commands (Red and Green). If user clicks on Red button red color will display on
the frame and if clicks on Green button green color will display on the frame.

8. Write a java (GUI) program as following specification:


There will be a MenuBar, Menus and MenuItems. User will click on MenuItem, the output will
display on the output screen.

9. Write a java (GUI) program for temperature converter (Fahrenheit to Celsius).


 There will be a text box, user will enter a number.
 There will be another text box that will show the conversion result.
 There will be a command button where user will click for the conversion result.

You might also like