Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Automatic Capital letter
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


hendra
Automatic Capital letter
2 Answer(s)      2 years and 8 months ago
Posted in : Java Beginners


Morning sir,

Can you help me, i want to make a automatic capital letter. I have a jTextfield1, if i type aaaaaa ,it will be automatic AAAAAA. can you help me give a source code. Thank you very much.

regards, Hendra


Advertisement
View Answers

July 9, 2012 at 4:00 PM


Here is an example that change the case of characters to uppercase as the user enters any character.

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;

class TextFieldExample extends JFrame{
JTextField text;
JLabel label;
JPanel p;
TextFieldExample(){
text=new JTextField(15);
label=new JLabel("Enter String:");
p=new JPanel();
p.add(label);
p.add(text);
text.addKeyListener(new KeyAdapter(){
            public void keyReleased(KeyEvent e){
                String st=text.getText();
                text.setText(st.toUpperCase());
            }
});
add(p);
setVisible(true);
setSize(300,100);
}
public static void main(String[]args){
TextFieldExample v=new TextFieldExample();
}
}


July 10, 2012 at 11:49 AM


ok thank you sir



Related Tutorials/Questions & Answers:
Automatic Capital letter
Automatic Capital letter  Morning sir, Can you help me, i want to make a automatic capital letter. I have a jTextfield1, if i type aaaaaa ,it will be automatic AAAAAA. can you help me give a source code. Thank you very much
automatic code
automatic code  how to call servlet automatically
Advertisements
how to delete a letter in a word?
how to delete a letter in a word?  how to delete a letter in a word? for example if i enter= roseindia, i want to delete 's', then output= roeindia
frequency of a letter in a string
frequency of a letter in a string  Could someone answer in netbeans please Write a program that takes in a string and a letter from the user and displays the number of appearances of the entered letter in the entered string
Automatic key press
Automatic key press  Hi Please any one help me is it possible automatic key press in j2me
letter counting for the smallest word
letter counting for the smallest word  How do I program my java program to only count the letters in the smallest of two words? this is what I have and it works EXCEPT that it counts all of the letters not just the smallest word
POI Word document (Letter Template)
POI Word document (Letter Template)  Dear Team, i need code for generating word document(letter format). i am unable to get the code for formats, font settings, letter type settings. please help me for the same. Thanks
sending automatic email - JavaMail
sending automatic email  Dear sir. In my project i need to send an automatic email to the clients when their accounts are going to expire in 30 days.i am using jsp,mysql and tomcat for my project.Expire information are stored
Welcome! to the News letter archive
News Letter Archive     ... letter sent our users.   Newsletters are regularly distributed...; News Letter Archive Date Subject
letter count problem - Java Beginners
letter count problem  i have a problem in my java coding to count two characters of a string. eg to count the letter "ou" in the string "How do you feel today?". The answer should be 5. but i still have error compiling
Check for character is letter or not.
Description: This tutorial demonstrate the use of Character.isLetter() method which checks whether the value stored in char data-type variable is letter or not. Code: public class CheckLetter 
Check for character is letter or digit.
Description .style1 { background-color: #FFFFCC; } Description: This tutorial demonstrate how to check a character variable value is a digit or letter using isLetterOrDigit() method. Code
Automatic primary Generation in Hibernate - Hibernate
Automatic primary Generation in Hibernate   Hi, Ow primary key is generated automatically in hibernate.give me sample code.Thank u
Want Automatic No with Date - Development process
Want Automatic No with Date   Hi, I want the jsp code. i want serial no with date and month.For example "240501" date is 24 and month is 05 and serial no 01 .Thanks Prakash
Find Capital using Switch-Case statement
Find Capital using Switch-Case statement In this Java Tutorial section, we are going to find the capital of our states using Switch-Case statement.... After that, when the user press the enter key, the capital city of that particular
automatic updation of a form - JSP-Servlet
automatic updation of a form   Sir, I need the code for if we fill the details in one page(form) that details should be updated automatically in another table like page.Please provide the code for this problem in JSP or java
Automatic Vehicle Location Advantage,Automatic Vehicle Location,Vehicle Location
Automatic Vehicle Location Advantage     ... or thing equipped with a very small device. AVL-What is It? Automatic Vehicle... such as real-time passenger information, automatic passenger counters and automated
How to delete line starting with a letter in java Regex?
How to delete line starting with a letter in java Regex?  Hi, i 'm trying to code with regex and java. i want to know how it's possible to delete lines which starts with a letter like G or g in a text. i tried
automatic discovery personal name aliases from the web
automatic discovery personal name aliases from the web  gogle web page display search the result
automatic discovery personal name aliases from the web
automatic discovery personal name aliases from the web  i want for web search area display code
Automatic Discovery of Personal Name Aliases from the Web
Automatic Discovery of Personal Name Aliases from the Web  i want code for snippet extraction in web
Automatic Discovery of Personal Name Aliases from the Web
Automatic Discovery of Personal Name Aliases from the Web  i want code for snippet extraction in web
automatic discovery personal name aliases from the web
automatic discovery personal name aliases from the web  enter the word clickbutton and goto internet connection,and below result information display
automatic discovery personal name aliases from the web
automatic discovery personal name aliases from the web  enter the name and enter the button to search result for internet connection below
automatic discovery personal name aliases from the web
automatic discovery personal name aliases from the web  create a text field in enter the name and search button to below result in internet connection
automatic discovery personal name aliases fromthe web
automatic discovery personal name aliases fromthe web  i need a sourse code in module form in pattern extraction &Candidate Aliases Extraction. &Ranking of Candidates
Automatic Vehicle Location (AVL)
Automatic Vehicle Location (AVL)       Overview: Automatic Vehicle Location (AVL) ... used technology is more used now. Utility: This Automatic Vehicle Tracking
Display first letter of every word in uppercase
Display first letter of every word in upper case In this Java tutorial section, you will learn how to display the first letter of every word in uppercase...;inputString = br.readLine(); FirstLetter letter=new FirstLetter
display all words containing the letter which i gave as input...
display all words containing the letter which i gave as input...  If i enter any character,it have to display the names which having that character..write a program using java example(output) Enter any character: a Names: Abi
display a list of names(when we press first letter)
display a list of names(when we press first letter)  If i gave...("Enter letter: "); String letter=input.next().substring(0,1...++){ if(countries[i].startsWith(letter)){ System.out.println(countries
Display set of names in array when we press the first letter
click the starting letter (like in gmail if we press the letter it will show...("Enter letter: "); String letter=input.next().substring(0,1...++){ if(countries[i].startsWith(letter)){ System.out.println
Advertisements
 

 

 

DMCA.com