You are on page 1of 1

Part-II

Programs For Applets, Frames and Swings:


1. Create an applet to draw a working calculator.
2. Create an applet to demonstrate the KeyEvent by displaying characters on the
applet window as the user type on the keyboard.
3. Create an applet for free hand drawing.
4. Create an applet that lets the user adjust its background color. Provide three
Scrollbars in your applet, one each for the three base colors, red, green and blue.
5. Create an applet that has its GUI components laid out as shown:

6 Create an applet that draws several random sized filled-circles at random places
in the applet window, in a random color, each time the button is pressed.

Q7. Write a frame application that has an Option menu. This menu has circle, rectangle,
filled circle and filled rectangle as their menu items. On clicking the relevant options
respective figures should be drawn.
Q8. Create a JFrame with the menu bar and add the following menus: File, Edit, Search.
Add default menu items to the respective menus. Add JPopUpMenu with the items:
New, Open, Cut,Copy and Paste.
Note: Extend the program by providing default functionalities to the Editor.
Q9. Create a JList object that display the elements in the specified array with items of
names. When the user double clicks on a name in the JList, the program prints the
index of the item being clicked to the console.
Q 10.Create an applet with four JButtons. The label for the following buttons are given
below: Confirm, Input, Option, Exit. After adding the buttons to the applet,click one of
the buttons. The action of clicking one of the button would bring the respective dialog
box on to the screen the last button.

You might also like