| | |
Frustrated with Java
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Aug 2009
Posts: 36
Reputation:
Solved Threads: 0
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.
http://java.sun.com/javase/6/docs/ap...TextField.html
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/ap...tionEvent.html
http://java.sun.com/javase/6/docs/ap...tionEvent.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.
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.
http://java.sun.com/javase/6/docs/ap...TextField.html
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/ap...tionEvent.html
http://java.sun.com/javase/6/docs/ap...tionEvent.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.
Last edited by and12; Sep 3rd, 2009 at 3:15 pm.
The only bug I see is you accusing a programming language which has been around for decades, used by thousands, for your incompetence.
Just because you can't get it to work doesn't mean it has a bug, it means you don't know what you are doing.
It is OK not to know, it is not ok to say that "java" has a bug when no one else has complained just because you rushed into doing something without the proper experience
This simple example can be found anywhere:
That is how you know what was clicked
Just because you can't get it to work doesn't mean it has a bug, it means you don't know what you are doing.
It is OK not to know, it is not ok to say that "java" has a bug when no one else has complained just because you rushed into doing something without the proper experience
This simple example can be found anywhere:
Java Syntax (Toggle Plain Text)
JButton butt = new JButton(); JTextField field =new JTextField(); public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source==butt) { } else if (source==field) { } }
That is how you know what was clicked
Check out my New Bike at my Public Profile at the "About Me" tab
•
•
Join Date: Aug 2009
Posts: 36
Reputation:
Solved Threads: 0
•
•
•
•
The only bug I see is you accusing a programming language which has been around for decades, used by thousands, for your incompetence.
Just because you can't get it to work doesn't mean it has a bug, it means you don't know what you are doing.
It is OK not to know, it is not ok to say that "java" has a bug when no one else has complained just because you rushed into doing something without the proper experience
This simple example can be found anywhere:
Java Syntax (Toggle Plain Text)
JButton butt = new JButton(); JTextField field =new JTextField(); public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source==butt) { } else if (source==field) { } }
That is how you know what was clicked
Why didn't you answer my previous post then if you think you're so smart.
Last edited by and12; Sep 3rd, 2009 at 5:23 pm.
•
•
Join Date: Jul 2009
Posts: 48
Reputation:
Solved Threads: 7
•
•
•
•
Please don't insult me. The above WAS NOT THE BUG i was talking about that i couldn't get trhough. It's merely a work around because people were complaining that they can't play my game.••••The only bug I see is you accusing a programming language which has been around for decades, used by thousands, for your incompetence.
Just because you can't get it to work doesn't mean it has a bug, it means you don't know what you are doing.
It is OK not to know, it is not ok to say that "java" has a bug when no one else has complained just because you rushed into doing something without the proper experience
This simple example can be found anywhere:
That is how you know what was clickedJava Syntax (Toggle Plain Text)
JButton butt = new JButton(); JTextField field =new JTextField(); public void actionPerformed(ActionEvent e) { Object source = e.getSource(); if (source==butt) { } else if (source==field) { } }
Why didn't you answer my previous post then if you think you're so smart.
•
•
•
•
Also my Java applets won't run on machines with a Macintosh. So how do you fix that?
I AM A NEWBIE TO JAVA.
The only one who is going to "fix" anything in your code is you. On this forum you can ask for help but you can not tell people to "fix" things for you.
The right to delete a post has nothing to do whit your programming skills. You should send a message to one of the moderators and ask for help.
•
•
•
•
Why didn't you answer my previous post then if you think you're so smart.
Also you never posted your code describing where is your problem and what you are trying to accomplish. We would have seen what you have written and provided solution. You just said that java has a bug and is preventing you from writing your code, because it is java's fault
Check out my New Bike at my Public Profile at the "About Me" tab
•
•
Join Date: Jul 2009
Posts: 48
Reputation:
Solved Threads: 7
Sorry I forgot this in my previous post...
I can really understand that frustration.
It took me a long time to understand the API and sometimes I still do not get it right. But it is really good that you use it and tries because once you have got a hang of it the API is very useful.
Java tutorials are a good complement to the API and you will find them here:
http://java.sun.com/docs/books/tutorial/
•
•
•
•
... I'm sorry i don't know how to find anything on java sun docs.
I am frustrated. ...
It took me a long time to understand the API and sometimes I still do not get it right. But it is really good that you use it and tries because once you have got a hang of it the API is very useful.
Java tutorials are a good complement to the API and you will find them here:
http://java.sun.com/docs/books/tutorial/
![]() |
Similar Threads
- Palindromes (Java)
- Frustrated JAVA student (Community Introductions)
- Java script - wordwrap ? (HTML and CSS)
- problem with java.util.Collections (Java)
- i think java troubles??.... (Java)
- Java or PHP? (IT Professionals' Lounge)
Other Threads in the Java Forum
- Previous Thread: Why can't all people enter a char
- Next Thread: help with Bulls and Cows game
Views: 410 | Replies: 7
| Thread Tools | Search this Thread |
Tag cloud for Java
911 addressbook android api append apple applet application arguments array arrays automation binary bluetooth character chat class classes client code component csv database detection draw eclipse error event exception file fractal ftp game givemetehcodez graphics gui helpwithhomework html ide image input integer j2me japplet java javaarraylist javaprojects jmf jni jpanel julia linux list loop map method methods mobile netbeans newbie number object objects oracle oriented os panel print problem program programming project projects recursion replaydirector reporting researchinmotion return robot scanner score screen se server set size sms socket sort sql stream string swing test threads time transfer tree ubuntu windows






