Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Java JTextArea
Name: Dado Date: October 21, 2004 at 18:22:37 Pacific OS: Win XP CPU/Ram: 512MB
Comment:
Using Java: I am inputting a string in a text field (consisting of numbers only), and then I would like to find all the even numbers in the string when a button to find the even numbers is pressed and display them in a text area, and find all the odd numbers in the string when a button to find the odd numbers is pressed and display them in a text area. How would I go about doing this? Help is appreciated! (Note: I'm new to Java)
Name: jubalsams Date: October 21, 2004 at 20:49:16 Pacific
Reply:
Well, i don't know java either but the general method would be: 1. scan in the string up to the next digit. 2. grab the digit and convert it to a number eg '2'=2 and so on. 3. use the MODULO 2 function ... it will be zero for even number and 1 for odd number. Test it and place in correct output position. 4. go to 1.
Summary: help me am a bit if a nebie. The problem: The first time you click encrypt and decrypt buttons work fine. The second time you use the encrypt and decrypt buttons it adds all the previous messages to ...
Summary: Ok, im taking a java programming class, and we are required to take input values from text fields in a container and put those values into one element of an array for storage ex. array[0] = [ var1, ...
Summary: Hello, I created a JTextArea object in a scrollable pane which is in a tabbed pane. The text area scrolls fine if the user holds a key down for a while. But when the user moves to a different tabbe...