09-10 java lab assign

Upload: kranthikiran01

Post on 04-Jun-2018

219 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/13/2019 09-10 Java Lab Assign

    1/1

    Lab Assignment # 51 Create an applet displaying a hello world message on the specific coordinates of applet.

    2 Draw a hut on applet using different methods of Graphicsclass

    3 Create an applet having three text fields and a button and perform the following steps:

    Identify its default layout

    Change its layout to grid border etc layout

    !he method pack( )

    Disable the layout manager and then place all the text fields and buttons on a specific location

    and their si"e.

    #et the bac$ground and fore ground color in text field

    Create a label and place it with a text box

    Change the font of the label to any other specification than default

    % Create a frame having three text fields and a button and perform the following steps:

    Identify its default layout

    Change its layout to grid border etc layout

    !he method pack( )

    Disable the layout manager and then place all the text fields and buttons on a specific location

    and their si"e.

    #et the bac$ground and fore ground color in text field

    Create a label and place it with a text box

    Change the font of the label to any other specification than default

    & '() showing addition of two numbers on applet and frame having:

    !wo text fields

    *ne button

    +enerate the string displaying addition result

    Implement action listener interface

    , Create a +-I based application either applet or frame/ for simple calculator.

    0 Design an application on appletframe implementing $ey listener and moving a given line segment on

    the $ey typed of arrow $eys by 1pixels

    Design a application on appletframe having following constraints:

    'indow had one text box having a default value should be C-#!*4

    If the $ey 5s6 is pressed the value in the box should be changed to #-7

    If the $ey 5m6 is pressed the value in the box should be changed to 4**7

    If the $ey 5e6 is pressed the value in the box should be changed to 8(9!

    ; Design a application on appletframe having following constraints:

    Default color of window as

    'indow had one text box and one button

    Default value in text box should be and the caption on button should be C=IC> 48

    If the mouse cursor entered the area of the component button the color of the window should

    be changed to 98D as well the value of the text box should be changed to 98D

    If the mouse cursor exited the area of the component button the color of the window should be

    changed to