Search

// program in java using awt control label and text field in which user inputs the value to the text field.


CODE

import java.applet.Applet;
import java.awt.Button;
import java.awt.TextField;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class AnonymouseButton extends Applet {
TextField txtSource;
Button btnToLOwer;
public void init()
{
txtSource=new TextField(20);
btnToLOwer=new Button("Lower Case");
btnToLOwer.addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e) {
String tmp=txtSource.getText();
tmp=tmp.toLowerCase();
txtSource.setText(tmp);
}});
add(txtSource);
add(btnToLOwer);
}
}

HTML CODE

<HTML>
<BODY>
<APPLET ALIGN="CENTER" CODE=" AnonymouseButton.java" width = "700" height = "400"></APPLET>
</BODY>
</HTML>

OUTPUT DISPLAY




Share this article :
 

Post a Comment

 
Support : everytricks4.blogspot.in/ | Johny Template | Mas Template
Copyright © 2011. Computer Tricks - All Rights Reserved
Creating Website Published by
Proudly powered by Blogger