Examples for using Widgets Assignment Help

Assignment Help: >> Controls and Events - Examples for using Widgets

Examples for using Widgets (Button, Checkbox, List and Choice):

The button class elaborates a push-button which could only have a textual label.

Button ( )

Button(String label)

These constructors are used for creating buttons.

String getLabel( )

void setLabel(String label)

These methods could be used to get and set the textual label.

// Illustrating button

import java.awt.*;

import jave.applet.*;

public class ButtonApplet extends Applet

{

public void init ( )

{

Button b= new Button("Do not push me");

add(button);

}

1052_Examples for using Widgets.png

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd