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

Java GUI and Database Programming Labs

these are the collections for the

Uploaded by

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

Java GUI and Database Programming Labs

these are the collections for the

Uploaded by

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

Lab 1: Using Layout Manager

1. WAP to design a frame using FlowLayout.


2. WAP to design a frame using BorderLayout.
3. WAP to design a frame using GridLayout.
4. Design a swing frame using GridBagLayout
5. Design a swing frame using GroupLayout.

Lab 2: Event Handling


1. Create a swing frame with two buttons "Add" and "Multiply" and 3 text fields.
Perform addition and multiplication on respective button click. Make 3rd text field
read only.
2. Create a swing frame with a menu bar and two menus "File" and "Help". The
"File" menu should contain "New","Save","Open" and "Exit" menu items. The "Help"
menu should contain "About Us". When "Exit" is clicked, program should terminate.
When "About Us" is clicked a custom dialog box should be displayed that prints the
"name and contact number of developer" in two different JLabels using font size 26,
font style BOLD and font -- Algerian.
[Link] a swing frame with two text fields one for name and another for contact
number. Perform validation (name should not contain numbers and contact number
should not contain alphaets).
[Link] a swing frame that contains 1 text field for name, 1 drop down list for
faculty, 2 radio buttons for gender (Male,Female), 3 check boxes for
hobbies("Music","Dance","Sports"), 1 list box for languages known and a submit
button. Use absolute layout (null layout).
5. Create a swing frame with a text field and a toggle button. When the toggle
button is pressed, it should display "Button is ON" in the text field and when the
toggle button is released, it should display "Button is OFF".
6. Create a swing frame with a text field, a text area and a button. When the
button is clicked the multiplication table of value entered in text field should be
displayed in the text area.
7. Create a swing frame with 2 buttons [show,hide] and a text field. When hide
button is clicked, text field should hide (disappear) and when show button is
clicked, the text field should be visible.

Lab 3: JDBC
[Link] to input id,name,address,age of 5 students and insert(save) into a table.
[Link] to input id of the student and delete the record matching that id.
3. WAP to input new age and id and update the age for given id.
4. Create a swing frame to input age and display the list of students whose age is
more than given input.
5. create a swing frame to input id and delete the matching records. Do
confirmation before deleting.
6. Create a swing frame where we can provide input for id, name, address, age and
on submit button click, the information should be saved to the database.
[Link] a login user interface using swing and perform user validation.

Lab 4: Servlet and JSP


1. Create a servlet to read a number provided from HTML and check odd/even.
2. Create a servlet to add two numbers provided from HTML.
3. Create a servlet to read a number from HTML and display its reverse.
4. Create a servlet to read a number from HTML and find its factorial.
5. Create a servlet to write cookie to user computer and then read all cookies
stored in the user computer.
6. Create a servlet that takes id, name, address, faculty of a student from HTML
form and then save the provided information to the database.
7. Create a JSP to add two numbers provided from HTML.
8. Create a JSP to diplay the records from database in a HTML table.
9. Create a Java Bean class Student with the attributes name, faculty, age. Use the
Java Bean in JSP.

Lab 5: (RMI)
1. Create a RMI application in which client sends a word to the server and server
responds to the client by sending its length.
2. Create a RMI application in which client sends radius of circle to the server
and server responds to the client by sending its area.
3. Create a RMI application in which client sends two numbers to the server and
server responds to the client by sending their product.

You might also like