Professional Documents
Culture Documents
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.