Created
August 30, 2015 05:13
-
-
Save jweinst1/bd35a9fa0d90b82e9bb7 to your computer and use it in GitHub Desktop.
basic textfield template in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.awt.*; | |
| import java.awt.event.*; | |
| import java.applet.*; | |
| public class textfield extends Applet implements ActionListener { | |
| TextField inputLine = new TextField(15); | |
| public textfield() { | |
| add(inputLine); | |
| inputLine.addActionListener(this); | |
| } | |
| public void actionPerformed(ActionEvent event) { | |
| String s = inputLine.getText(); | |
| String sUp = s.toUpperCase(); | |
| inputLine.setText(sUp); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment