This document contains 4 Java tutorials covering threads and synchronization, applets, Swing GUI components, JDBC, and servlets. Tutorial 1 focuses on threads, yield(), stop(), and sleep() methods and using anonymous inner classes. Tutorial 2 covers creating GUI applets and frames using Swing components like JApplet, JButton, JTable, and JScrollPane. Tutorial 3 provides exercises on connecting to an Oracle database using JDBC and performing CRUD operations. Tutorial 4 has exercises on servlets for greeting messages, session handling, and displaying request information.
Download as DOC, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
61 views
Java-Tutorial Tutorial - 1
This document contains 4 Java tutorials covering threads and synchronization, applets, Swing GUI components, JDBC, and servlets. Tutorial 1 focuses on threads, yield(), stop(), and sleep() methods and using anonymous inner classes. Tutorial 2 covers creating GUI applets and frames using Swing components like JApplet, JButton, JTable, and JScrollPane. Tutorial 3 provides exercises on connecting to an Oracle database using JDBC and performing CRUD operations. Tutorial 4 has exercises on servlets for greeting messages, session handling, and displaying request information.
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 4
Java-Tutorial
Tutorial - 1 :
1. Write a program that demonstrates thread priority. Also make use of
the following methods yield(), stop(), sleep(). 2. Write a multithreaded program to achieve Synchronization. 3. Use anonymous inner classes to write an applet that changes to cyan while the mouse is being dragged. All the other times, the applet should be white. 4. Write an applet that displays “Good Morning” if the current time is between 12 a.m and 12.p.m, “Good Afternoon”” if the current time is between 12 p.m and 6p.m and “Good Evening” if the current time is between 6p.m and 12a.m . 5. Write an applet that contains a checkbox group with three check boxes labeled “Green”, “red” and “Blue”. The selection should determine the color of the applet. 6. Write a Frame Applet class that displays a count in each frame that is created.
Tutorial- 2:
1. Write a java swing program to display the following JApplet
2. Write a program to generate the following GUI.
3. Write a program to generate the following GUI, the click on a button should quit the program.
4. Write a program to generate the following GUI demonstrating JTable.
5. Write a java applet program to generate a GUI with around500 Buttons using JScrollPAne
6. Write a java applet program to generate the following GUI using
JTree Tutorial-3: JDBC connectivity with Oracle Server
1. Write a JDBC program using JDBC-ODBC driver to connect to the
oracle server. 2. Write a program to create a table BOOK with necessary field. 3. Write a program to insert the values into the above BOOK table. 4. Write a program to delete/update records in the BOOK table. 5. Write a program to insert into BOOK table using Prepare Statement. 6. Write a program to search for a particular book.
Tutorial- 4: Servlets
1. Write a program to accept user name and display greeting message.
2. Write a program to change the background color of the page based on the color selected by the user. 3. Write a program to display a greeting based on the access time of the server. 4. write a program to create a session and display session information viz. session ID, creation time and last accessed. 5. Write a program to request server information viz. Request method, URL, Protocol and Remote address. 6. Write a program to accept user name and address and display them in a web page by passing parameters.