0% found this document useful (0 votes)
45 views2 pages

Assignment 1 AJP

Uploaded by

dhruvvaghela2306
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)
45 views2 pages

Assignment 1 AJP

Uploaded by

dhruvvaghela2306
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/ 2

GOVERNMENT POLYTECHNIC, AHMEDABAD

DEPARTMENT OF INFORMATION TECHNOLOGY


TERM: 27/07/2023 TO 16/12/2023 [231]

Course Code: 4351603 Semester: 5th


Course Title: Advanced JAVA Programming

Date:

ASSIGNMENT-1 (Unit -1)

This assignment covers following course outcome:

CO1: Develop a GUI application using swing components.

1. Explain the main differences between AWT and Swing in Java. Also discuss
the advantages of using Swing over AWT for developing graphical user
interfaces (GUIs).
2. Explain the hierarchy of Swing classes.
3. Discuss the purpose and usage of the add(), setSize(), setLayout(), and
setVisible() methods in the Component class.
4. Explain the purpose and usage of the following Swing components:
• JLabel
• JTextField
• JTextArea
• JButton
• JCheckBox
• JRadioButton
• JComboBox
• JMenu
5. Describe the following layout managers: Flow Layout, Border Layout, Card
Layout, Box Layout, Grid Layout, Gridbag Layout, Group Layout, and Spring
Layout.
6. Describe the concept of event handling in Java Swing.
7. Discuss the following event types: Action Events, Key Events, Focus Events,
Window Events, Mouse Events, and Item Events. Provide examples
illustrating the usage of each event type.
8. Explain the purpose and usage of the ActionListener, KeyListener,
FocusListener, WindowListener, MouseListener, MouseMotionListener, and
ItemListener interfaces.
9. Develop a GUI program that utilizes at least two of the above listener
interfaces to handle different types of events.
10. Develop a Java Swing program that demonstrates the usage of different
layout managers. Create a JFrame with multiple panels, each using a different
GOVERNMENT POLYTECHNIC, AHMEDABAD
DEPARTMENT OF INFORMATION TECHNOLOGY
TERM: 27/07/2023 TO 16/12/2023 [231]

Course Code: 4351603 Semester: 5th


Course Title: Advanced JAVA Programming

layout manager. Add appropriate components to each panel and observe


how the layout managers affect the component arrangement.

You might also like