0% found this document useful (0 votes)
4 views

15 Assignment 5

The document outlines a series of programming assignments focused on Object Oriented Programming using Java, specifically targeting Applet and Swing components. It includes tasks such as creating applets with various graphical elements, implementing user input forms, and developing interactive applications with features like audio playback and color changes. The assignments aim to enhance practical skills in Java programming through hands-on projects involving both Applet and Swing frameworks.

Uploaded by

rameez.aam2002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

15 Assignment 5

The document outlines a series of programming assignments focused on Object Oriented Programming using Java, specifically targeting Applet and Swing components. It includes tasks such as creating applets with various graphical elements, implementing user input forms, and developing interactive applications with features like audio playback and color changes. The assignments aim to enhance practical skills in Java programming through hands-on projects involving both Applet and Swing frameworks.

Uploaded by

rameez.aam2002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

1

Assignment-5: Object Oriented Programming Lab (Code: PCC-CS593) (Applet & Swing)

Applet and JApplet:


1. Write a program to create an applet with red back ground and display the Message WELCOME
TO THE WORLD OF APPLETS. Write its HTML document also. Specify width and height
to the Applet.

2. Write an applet that places a rectangle, a rounded rectangle, a 3D rectangle and a filled
rectangle of random sizes and colors inside the applet's visible area.

3. Write an applet that draws a circle, a line, an arc and a polygon inside the applet's visible area.

4. Write a Java program for implementing the PARAM concept using Applet.

5. Write a Java program to implement Payroll Development of a company using Applet.

6. Write a Java program to implement Mark Sheet design of students using Applet.

7. Write a Java program to run audio files (.wav files) using Applet.

8. Write a Java program to design a Calculator with Button using Applet.

9. Write a Java program to create a JApplet with three Jbuttons Morning, Afternoon and
Evening. When we click Morning button, the message "Good Morning to you" must
appear. Similar for the other two buttons "Good Afternoon to you" and "Good evening
to you" must appear. Each message must appear in a different Background, text, Color and
Font.

10. Create Java applet to show current system date and time and wish accordingly.

11. Develop applet that receives 3 numeric values as input from user. Display the largest of the 3
onscreen.

12. Write applet containing a list of countries. Display the selected country in text box.

13. Write applet that displays red oval which turns green when user moves mouse over it and turns
back to red when user moves the mouse outside of the oval.

14. Program using applet to create 2 text fields for entering roll no and name of student. When
Ok button is pressed, it should validate the roll no field i.e. it contains only digit, else print
message to correct roll no.

Swing:
15. Create a login form which contains a user id and password fields, and two buttons Submit
and Reset. If the user id or password field is left blank, then on click of Submit button,
show a message to the user to fill in the fields. On click of Reset button, clear the fields.

16. Create two lists using JList class with a button. On click of that button, all selected items in
one list are copied to the other list.
2

17. Design screen in Java which contains text box. If left mouse button is clicked, convert the text to
uppercase and if right button is clicked, convert it to lower case.

18. Design a screen using swings that will create two text areas, two text fields and two buttons.
The text areas are called "originalText" and "modifiedText" respectively. The text
fields are called "find" and "replace" respectively. The buttons are called "Find and
Replace" and "Clear" respectively. The user types a paragraph in the text area
"originalText", now types a word in the text field "find" and another text in the text field
"replace". Now the user clicks the button "Find and Replace". On pressing the button
the paragraph in the text area is subject to the find and replace activity. Display result in the text
area "modifiedText ". Display count of total number of replacements made. Button
"Clear" is used to clear the text areas and text fields.

19. Java program to design a screen using swings that will take a user name and password. If
user name and password are not same, raise an exception with appropriate message. User
can have 3 login chances only. Use clear button to clear the textboxes.

20. Write a Java program to create a list with some colors in the items. When the color is selected,
the background color must change accordingly. When the background color changes, the name
of the color must also appear in the screen in Font Arial, 32, Bold + Italics.

21. Write a Java program to demonstrate the use of radio buttons.

22. Write a Java program to create a window with text fields for the Name, Address and PinCode
with suitable labels. Also the window contains a button MyDetails. When the user types his
name, address and pincode and then clicks the button MyDetails, the typed details must
appear in a text area in Arial Font, size 30, Italics.

23. Write program to accept the details of Employee from user and display it on next frame.

You might also like