I Don't want to use keyListeners anymore since it's there's too many unfixable bugs with it.
Problem#1: I am now trying to have a Label say "Enter a consonant" and beside it a textField that should be the size of one character.
I tried setColumns(1) but it won't work and my text has setMaximumSize(new Dimension(16,60) which fits 'm" because it's fatter than all the other characters.
But it still lets me show multiple characters but setColumns is only suppose to show 1 character at a time.
This is why i am beginning to hate Java. That even if i look up documentation, it won't work.
void setColumns(int columns)
Sets the number of columns in this TextField, and then invalidate the layout
Problem #2: I am now trying to get actionPerformed to get info from my textbox.
How do i get it to so that it knows which textbox it came from because now I have two since that awful keyListener don't work :@ for MOST people but it's fine on my machine.
For my consonant entered, i want it to know it came from the KeyEntered JTextfield and NOT the Solution JTextfield.
But i can't seem to find the proper command in java docs about how to access the name of the textfield it came from.http://java.sun.com/j2se/1.3/docs/api/java/awt/event/ActionEvent.html
getActionCommand() will only get what is was typed inside the JTextfield and not it's source.
I'm sorry i don't know how to find anything on java sun docs.
I am frustrated. After this, i don't think i will want to program in Java again. Java has too many bugs. I am still bitter about that keyListener only was able to work on some computers including mine but not on a majority of a computer owners. Not only that i can't even control the event. It's utter useless if it won't work for a majority of people.
I still can't post on java sun forums. It's been a headache with their email address not being validated even though i clicked that link and it said "Thank you for validating your email address". It still won't let me post any forums because it still insists my email address isn't validated.
I've sent two feedbacks already. I joined that java sun forum the day before I joined daniweb and still not been able to post anything there. :@