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



Home Answers Viewqa Java-Beginners Automatic Capital letter

Have Programming Question? Ask it here!
 
 
 


hendra
Automatic Capital letter
2 Answer(s)      2 years 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
Automatic key press
Automatic key press  Hi Please any one help me is it possible automatic key press in j2me
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
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 
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
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
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
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
Collections Exercise 2a - State Capital Output
Java: Collections Exercise 2a - State Capital Output Name ____________________________________ The solution to mapping from a state code (eg, "MI", "NY", ...) to its capital city ("Lansing", "Albany", ...) is to use a HashMap
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
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  i want for web search area display code
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 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
how to generate automatic bill based on selected values using jsp/javascript?
how to generate automatic bill based on selected values using jsp/javascript?  how to generate automatic bill based on selected values using jsp/javascript
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
Automatic Vehicle Tracking System
Automatic Vehicle Tracking System Tracking the location of vehicles.... Automatic vehicle tracking system is the advent of this technology and solves... that the results are not only accurate, but also proper authorised. The automatic
need source code fir automatic timesheet filling. can anyone peass help?
need source code fir automatic timesheet filling. can anyone peass help?  Hi friends, I wants to develop a software that should automatically fills the time sheet using the login and log out entries. Can anyone please help me
Automatic Vehicle Location Advantage
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
Automatic vehicle location (AVL)
Automatic vehicle location (AVL)       Introduction: AVL enables one to locate any vehicle through.... Automatic vehicle location is also called Telelocation and is an important tool which
Count letters in a string.
Description: This tutorial demonstrate how to find number of letter exists in a string. The str.length() method find the length of string. Code: public class CheckLetterInString {   
Exercise - Capitalize Words
returns a string first letter in every word capitalized and every other letter in lowercase. Assume the first letter is any letter preceded by a non... outside a word, it must be the first letter so it should be changed to uppercase
Programming: Count X
Java NotesProgramming: Count X Name ________________________________ Description Write a program which counts the number of times the letter "x" or "X" appears in the input
gOFFICE
gOFFICE       Free online word processor, outpput can be pdf or html letters, allows personalization in letter templates. Read full Description
Mysql Lower Case
Mysql Lower Case       Mysql Lower Case is used to convert the Upper Case letter to the Lower Case. Understand With Example The section of this Tutorial illustrate an example from
Mysql Lower Case
Mysql Lower Case       Mysql Lower Case is used to convert the Upper Case letter to the Lower Case. Understand With Example The section of this Tutorial illustrate
Example: Capitalize
: Capitalize This program reads a word, makes the first letter upper case.../capitalize/Capitalize2.java // Purpose: Make first letter upper case, remainder lower case.... String firstLetter = inputWord.substring(0,1); // Get first letter
Sales Letters Write Services
Sales Letter Writing One of the best tips for sales letter writing... of effective sales letter writing have increased a lot. And demand of a skilled writer... proficient in proposal/sales letter writing. And hence the hunt for a good writer
Introspection
Introspection       Introspection is the automatic process that analyzes the design pattern of a bean in order to reveal bean's properties, events, and methods. This process
Autoboxing in Java
Autoboxing in Java is the automatic transformation of primitive data types... he automatic transformation of wrapper class object into their corresponding primitive data types. Autoboxing or automatic transformation of primitive data
Gangtok Summer Destination of India
Gangtok Hill Station - A perfect Summer Destination in Eastern Himalayas Enchantingly snuggled amidst the tranquil hills of eastern Himalayas, the capital of Sikkim, Gangtok, is a summer destination par excellence. All your
Delhi sightseeing from Gurgaon
Delhi Sightseeing from Gurgaon Gurgaon, a major suburb of Indian capital Delhi is well admired for being home to a large number of software companies and other multi-national corporations. Needless to say, this city in proximity
Java Vector
Java Vector       Introduction to Vector Vector are array list with extended properties which follow the dynamic and automatic addition of data at run-time. Unlike array, Vector
 

 

 

DMCA.com