Question

in a GUI, as a user types an input, the upper case letters are immediately converted...

in a GUI, as a user types an input, the upper case letters are immediately converted to lower case and shown in the textfield

what kind of eventlistener should be used for the letter conversion

what kind if eventlistener should be used to immediately show it in the textfield

explain why you picked it


JAVA
0 0
Add a comment Improve this question Transcribed image text
Answer #1

I suggest you to use the KeyListener in java to convert the letters when user typing.

The java Key Listener is notified whenever you changed the state of the key. it is notified aganist key event.

The key listener interface is found in java.awt.event package. It has three methods;

1. KeyPressed(KeyEvent e)

2. KeyReleased(KeyEvent e)

3. KeyTyped(KeyEvent e).

so using these you can check if a key is typed , you can capitalize the words accordingly.

Add a comment
Know the answer?
Add Answer to:
in a GUI, as a user types an input, the upper case letters are immediately converted...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • For this question you will need to complete the methods to create a JavaFX GUI application...

    For this question you will need to complete the methods to create a JavaFX GUI application that implements two String analysis algorithms. Each algorithm is activated when its associated button is pressed. They both take their input from the text typed by the user in a TextField and they both display their output via a Text component at the bottom of the GUI, which is initialized to “Choose a string methods as indicated in the partially completed class shown after...

  • Create a new Java class called: House public class House Remember that Java is case-sensitive. This...

    Create a new Java class called: House public class House Remember that Java is case-sensitive. This means that the class name Diamond should start with a capital letter, and then the rest of the letters should be all lower-case. It would work if you were to use any combination of upper and lower-case letters, but that idea does not follow the assignment instructions. Write a Java application program that prints, the following house drawing to the screen: The house is...

  • This project is designed to help you practice Graphical User Interfaces (GUI) using Java. Design and...

    This project is designed to help you practice Graphical User Interfaces (GUI) using Java. Design and write a class needed to simulate a pizza shop ordering system GUI. Your ordering system should allow the user to select whether the order is to be delivered or picked up, the items ordered from the menu and the name of the person making the order. When the user presses the place order button, the display should show the delivery status, the items ordered,...

  • C Program In this assignment you'll write a program that encrypts the alphabetic letters in a...

    C Program In this assignment you'll write a program that encrypts the alphabetic letters in a file using the Vigenère cipher. Your program will take two command line parameters containing the names of the file storing the encryption key and the file to be encrypted. The program must generate output to the console (terminal) screen as specified below. Command Line Parameters Your program must compile and run from the command line. The program executable must be named “vigenere” (all lower...

  • I need my c++ code converted to MASM (assembly language). The instructions below: write an assembly...

    I need my c++ code converted to MASM (assembly language). The instructions below: write an assembly program that does the following; 1. count and display the number of words in the user input string. 2. Flip the case of each character from upper to lower or lower to upper. For example if the user types in:   "Hello thEre. How aRe yOu?" Your output should be: The number of words in the input string is: 5 The output string is : hELLO...

  • Java programming only Create a Java program that inputs a grade from the user. The grade input from the user will be an...

    Java programming only Create a Java program that inputs a grade from the user. The grade input from the user will be an integer. Once the input is stored, use an if-else-if block of code to determine the letter grade of the inputted integer grade. Do not use a bunch of if statements by themselves to solve this problem. You will print an error message for inputs greater than 100 and for inputs less than 0. Both errors must be...

  • Write a Java program which takes a string as a user input. Create 2 functions. The...

    Write a Java program which takes a string as a user input. Create 2 functions. The first function expects a string as argument and returns void. It converts all upper case characters to lower case and converts all lower case characters to upper case. It then prints out the converted string to a console. The second function also expects a string as argument and returns void. It will find first charactor that is repeated exactly 2 times in the string....

  • You notice that users are entering upper case letters, complete responses, and other hard to deal...

    You notice that users are entering upper case letters, complete responses, and other hard to deal with input. To help them out, you will extend your program so that if the user enters something other than 'a', 'b', or 'c' the program will immediately respond with Invalid input! Enter a, b, or c next time. Your program will go on to mark them incorrect. This behavior will apply to the multiple choice questions only. Below is how your output should...

  • Introduction to Java programming You will create a secure password. Ask a user to enter first...

    Introduction to Java programming You will create a secure password. Ask a user to enter first name and last name. (Allow for mixed case) Create a random integer from 10-99. Create the password string that consists of the upper case letter of the last letter of his/her first name, the random number, and the first three letters of his/her last name in lower case. Example someone with the name Rob Lee might have a password that looks like B56lee. Your...

  • Matlab a) Write a MATLAB code that takes the grade letters from the user and provide him/her with the GPA for that seme...

    Matlab a) Write a MATLAB code that takes the grade letters from the user and provide him/her with the GPA for that semester Enter your grades (letters): AABBC (input) Your GPA is 3.2 output) b) Write a Matlab user defined function to that takes a letter grade and return a numeric grade as shown in the table below. Any other value should give an error message (Invalid Grade). You function name should be Letter2Grade Use the following information to calculate...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT