HamiIT
Sign inGet started
Home
ADD CONTENT

Sign in Required

Please sign in to add content

Sign In
ProgramsBCASemester 6Advanced Java ProgrammingUnit 1: GUI Programming (12Hrs)
Chapter Study

BCA Semester 6 – Advanced Java Programming – Unit 1: GUI Programming (12Hrs)

Comprehensive questions and detailed answers for Unit 1: GUI Programming (12Hrs). Perfect for exam preparation and concept clarity.

14
Questions
85
Marks
Back to All Chapters
1

Why do we need a top-level container like JFrame to write Java programs with GUI? How can we display two-dimensional objects in Java?

MediumTHEORY5 marks2021(TU FOHSS Final)
2

Explain JTextField and JTextArea components of the Java Swing library.

MediumTHEORY5 marks2021(TU FOHSS Final)
3

Write a GUI application to find the sum and difference of two integer numbers. Use two text fields for input and a third text field for output. Your program should display the sum if the user presses the mouse and the difference if the user releases the mouse.

HardTHEORY10 marks2021(TU FOHSS Final)
4

Why do we use Panels while creating GUI applications in Java? Explain the components of the event handling model in Java.

MediumTHEORY5 marks2022(TU FOHSS Final)
5

What are adapter classes? What is the benefit of using adapter classes in Java while creating events in GUI programs? Explain with an example.

MediumTHEORY5 marks2022(TU FOHSS Final)
6

Write short notes on (Any Two):

a) 2D shapes in swing

b) MouseEvent and MouseListener

c) Session tracking

MediumTHEORY5 marks2022(TU FOHSS Final)
7

Why do we need to use Layout managers while creating GUI application in Java? Explain the key interfaces required to develop any database application using Java. Also, write a program to display the records from the table Students who have got distinction and have a major subject Data science. Assume that the Student table is in the database College and contains the columns Rollno, Name, Level, Division and Major.

HardTHEORY10 marks2022(TU FOHSS Final)
8

What is the role of Event Listener in event handling? List different event listeners provided by Java.

MediumTHEORY5 marks2023(TU FOHSS Final)
9

What is KeyEvent? Explain with a proper example.

MediumTHEORY5 marks2023(TU FOHSS Final)
10

Write short notes on (any two):

a) Adapter classes

b) CORBA

c) Life cycle of a servlet

MediumTHEORY5 marks2023(TU FOHSS Final)
11

How a frame can be created in Java? Explain. Write a program to create a GUI application in Java that identifies the smaller and greater number between two input numbers taken through two text fields and displays the result in a label. If the user presses the mouse it should display the smaller number and if the user releases the mouse it should display the greater number.

HardTHEORY10 marks2023(TU FOHSS Final)
12

What is the use of WindowEvent? List different methods of WindowListener interface with its uses.

MediumTHEORY5 marks2024(TU FOHSS Final)
13

How can you display images in GUI using Java? Explain.

MediumTHEORY5 marks2024(TU FOHSS Final)
14

Write short notes on (Any two):

a) JMenuBar

b) Session handling in Servlet

c) Marshalling and Unmarshalling of arguments in RMI

MediumTHEORY5 marks2024(TU FOHSS Final)
Showing 14 questions

Exam Years

Past question papers

2024
TU FOHSS Final•3 questions
2023
TU FOHSS Final•4 questions
2022
TU FOHSS Final•4 questions
2021
TU FOHSS Final•3 questions

Questions in Unit 1: GUI Programming (12Hrs)

Why do we need a top-level container like JFrame to write Java programs with GUI? How can we display two-dimensional objects in Java?

Marks: 5

Year: 2021 Final TU FOHSS

1. Client–Server Software Model Definition The Client–Server software model is a distributed computing model in which: - A client requests services or resources, and - A server provides those servi

Explain JTextField and JTextArea components of the Java Swing library.

Marks: 5

Year: 2021 Final TU FOHSS

1. JTextField Definition JTextField is a Swing component used to accept and display a single line of text from the user. Key Features - Allows single-line text input. - Commonly used for usernames,

Write a GUI application to find the sum and difference of two integer numbers. Use two text fields for input and a third text field for output. Your program should display the sum if the user presses

Marks: 10

Year: 2021 Final TU FOHSS

Java GUI Application: Sum and Difference of Two Numbers Description - Uses three JTextFields: two for input, one for output. - Performs sum on mouse press and difference on mouse release. Code Exa

Why do we use Panels while creating GUI applications in Java? Explain the components of the event handling model in Java.

Marks: 5

Year: 2022 Final TU FOHSS

1. Use of Panels in Java GUI Applications Definition A Panel (JPanel in Swing) is a container used to organize and group GUI components within a window or another container. Reasons for Using Panels

What are adapter classes? What is the benefit of using adapter classes in Java while creating events in GUI programs? Explain with an example.

Marks: 5

Year: 2022 Final TU FOHSS

Adapter Classes in Java Definition An adapter class in Java is an abstract class that implements a listener interface and provides empty method bodies for all methods in the interface. It allows a

Write short notes on (Any Two): a) 2D shapes in swing b) MouseEvent and MouseListener c) Session tracking

Marks: 5

Year: 2022 Final TU FOHSS

a) 2D Shapes in Swing Definition: Swing provides the Graphics and Graphics2D classes to draw two-dimensional shapes like lines, rectangles, circles, and polygons. Key Points: - Drawing is done by ov

Why do we need to use Layout managers while creating GUI application in Java? Explain the key interfaces required to develop any database application using Java. Also, write a program to display the r

Marks: 10

Year: 2022 Final TU FOHSS

1. Need for Layout Managers in Java GUI Definition A layout manager is an object that controls the size and position of components in a container (like JFrame or JPanel). Reasons to Use Layout Manag

What is the role of Event Listener in event handling? List different event listeners provided by Java.

Marks: 5

Year: 2023 Final TU FOHSS

Role of Event Listener in Event Handling Definition An Event Listener is an interface in Java that receives and handles events generated by GUI components (event sources) such as buttons, mouse, keyb

What is KeyEvent? Explain with a proper example.

Marks: 5

Year: 2023 Final TU FOHSS

What is KeyEvent? Definition KeyEvent is an event in Java that is generated when a user presses, releases, or types a key on the keyboard. It is part of the java.awt.event package and is used in ke

Write short notes on (any two): a) Adapter classes b) CORBA c) Life cycle of a servlet

Marks: 5

Year: 2023 Final TU FOHSS

a) Adapter Classes Definition: Adapter classes in Java provide default (empty) implementations of listener interfaces so that developers do not have to implement all methods of an interface. Explana

How a frame can be created in Java? Explain. Write a program to create a GUI application in Java that identifies the smaller and greater number between two input numbers taken through two text fields

Marks: 10

Year: 2023 Final TU FOHSS

How a Frame Can Be Created in Java Definition A frame is a top-level window in Java that provides a container for adding GUI components such as buttons, labels, text fields, etc. Steps to Create a

What is the use of WindowEvent? List different methods of WindowListener interface with its uses.

Marks: 5

Year: 2024 Final TU FOHSS

WindowEvent in Java Definition: A WindowEvent represents events generated by window actions such as opening, closing, minimizing, maximizing, or activating a window in Java GUI applications. Use:

How can you display images in GUI using Java? Explain.

Marks: 5

Year: 2024 Final TU FOHSS

Displaying Images in Java GUI Definition In Java GUI, images can be displayed using Swing components like JLabel or Canvas by loading the image into an ImageIcon or Image object. --- Steps to Displa

Write short notes on (Any two): a) JMenuBar b) Session handling in Servlet c) Marshalling and Unmarshalling of arguments in RMI

Marks: 5

Year: 2024 Final TU FOHSS

a) JMenuBar Definition: JMenuBar is a Swing component used to create a menu bar in a GUI application. It holds JMenu objects, which in turn contain JMenuItem objects for actions. Key Points: - Provi

About Unit 1: GUI Programming (12Hrs) Questions

This page contains comprehensive questions from the Unit 1: GUI Programming (12Hrs) chapter of Advanced Java Programming, part of the BCA Semester 6 curriculum. All questions include detailed model answers from past TU exam papers.

Study Tips

  • Review concepts before attempting questions
  • Practice writing complete answers
  • Compare your answers with model solutions
  • Focus on questions from recent years
  • Use direct links (#question-ID) to bookmark and share specific questions

Related Resources

← Back to Advanced Java Programming Chapters

Unit 1: GUI Programming (12Hrs) chapter questions with answers for Advanced Java Programming (BCA Semester 6). Prepare for TU exams with our comprehensive question bank and model answers.

H
Hami IT

Empowering IT students with quality education resources and comprehensive exam preparation materials.

Programs

  • Flutter
  • Java
  • DevOps

Company

  • About Us
  • Contact

Contact

  • 📧hamiit.dev@gmail.com
  • 📞+977 9813706443
  • 📍Kathmandu, Nepal

© 2026 Hami IT. All rights reserved.