P a g e
K. K. Wagh Polytechnic, Nashik
Department of Computer
Sub: AJP (12259
Ch 1: Introduction to AWT Components
What do you mean by Layout Manager? List different
What are font & font metrics classes? Explain with the help of example to set font to
What is frame? Write procedures to close frame with the help of example.
Write a program to demonstrate the use of Border Layout which shows four b
at 4 sided of an applet with captions as East, West, North & South. (8 Mks)
What are dialog boxes? Give the type of dialog boxes.
Explain any four methods of checkbox class with syntax.
Write a program to create an applet that will accept values
of three numbers i.e.
num1, num2, num3. The user will enter the values in three separate test fields. The
applet will have two buttons labeled “ Find Largest” & “Find Smallest”. When the user
will clck on the button “Find Largest”, the largest value amon
g the three numbers will
be displayed in fourth text field & when the user will click on the button “Find
Smallest”, smallest value among the three numbers will be displayed in fourth text
field ( labeled as Result) (8 Mks)
Explain the use of button contr
ol in AWT with example.
Write a program to create an applet that will accept a number in a text field & display
factorial of that number in another text field when the button caption “Factorial” is
clicked. (8 Mks)
Explain the use of scrollbar & adjustmen
t event class along with its constructors.
Write constructors for color class & method for drawing polygon.
Write a program to create an applet which will accept 2 nos from users & will provide
result of four operations i.e. addition, subtraction, multip
lication, & division. On
selection of any of these items operations provided in one choice box. (8 Mks)
Explain the use of following methods of List class along with their syntax
Write a program to create an applet that will display the name, family, size & style of
currently selected font.
Write a program to create an applet that will accept values of three test marks i.e.
test1, test2, test3 each out of 25. The user will enter
the marks in three separate text
fields. The applet will have a button labeled “Find average”. When the user will click
on the button the average of test marks will be displayed in fourth text field.
P a g e
The Tour of Swing
Differentiate between AWT & Sw
Give the use of following:
Give sequential steps to use JTabbedPane control. Also give syntax of three
constructors of JTabbedPane class.
Write a program to display a JComboBox on applet. The combo box will have t
Banana, apple, orange, chickoo, grapes.
What is scroll pane? Give the sequential steps to use JScrollPane control of swing.
Give the sequential steps to use JTree control of swing. Also give syntax of four
constructors of JTree class.
Write a program to display JTabbedPane in applet using swing.
Write a program to create a frame using swing with title “changing colors” having
buttons Red, Green, Blue. Clicking on this button background should c
Write a program to display a button with an image on it using swing. The image
on the button will change when the button is clicked.
Write a sequential steps to establish connection between client socket & server
( 4 M)
Write to print protocol, port, host, file of
be the meaning of
i) port ii) URL
Give meaning and purpose of proxy server.
What is Internet Addressing? Explain the purpose of InetAddress class.( 4 M)
Describe the purpose of the following.
i) Reserved Sockets ii) Proxy server
Describe the use of the following with DatagramPacket class.
i) getPort( ) ii) getData( )
Give the use of URL class along with the syntax of constructors.
Write a program to retrieve & display host name & port number using InetAd
class. (4 M)
Describe the following terms
i) ODBC ii) JDBC
Write a program to create connection to database
and create one table
& insert 3 records in it.
Describe the use of following terms
i) DriverManager ii) Connection iii) ResultSet.
( 6 M)
d) Write use of the following methods in Statement interface
P a g e
i) executeQuery( ) ii) executeUpdate( )
e) Classify JDBC d
river types according to their architecture.
f) Describe the use of commit & rollback methods of connection interface.
h) Describe the syntax & use of 4 methods for navigation through database records
using resultset object
Describe the use of JDBC
( 4 M)
Write a program to make the connectivity with database using JDBC & display
records in the table. Assume the suitable data.
( 6 M)
Explain PreparedStatement interface with example
( 4 M)
tier & three
tier database design of JDBC API with neat diagram( 8 M)
Describe the following
i) Cookies ii) Session
Write a program to demonstrate use of doGet( ) method of HttpServlet class.
Write a code seg
ment to pass username & password and retrieving values of
parameters to servlet.
Write a servlet to store password accepted from client in a cookie and display it.
Write a program to display session ID using servelt.
List any four interfaces in jav
ax.servlet package and also give the use of each.
Explain life cycle of servlet.
Write a code segment to demonstrate reading initialization parameters to servlet.
Write a program to create servlet that handles HTTP post request.
Explain the use of the fo
llowing methods of ServletRequest interface along with
i) getContentType( ) ii) getParameterNames() iii)getReader( ) iv)getParameter( )
Explain the difference between doGet( ) & doPost( ) method.
Write a servlet which shows how many times
user has visited the page in session.
Write a servlet to display data stored in a cookie. Data will be username given by
Write a program of servlet to display “ Welcome to Servlet” using GenericServlet