943,948 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 675
  • Java RSS
Sep 3rd, 2009
0

Frustrated with Java

Expand Post »
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.
Last edited by and12; Sep 3rd, 2009 at 3:15 pm.
Similar Threads
Reputation Points: 2
Solved Threads: 0
Light Poster
and12 is offline Offline
37 posts
since Aug 2009
Sep 3rd, 2009
1

Re: Frustrated with Java

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)
  1. JButton butt = new JButton();
  2. JTextField field =new JTextField();
  3.  
  4. public void actionPerformed(ActionEvent e) {
  5. Object source = e.getSource();
  6. if (source==butt) {
  7.  
  8. } else if (source==field) {
  9.  
  10. }
  11. }

That is how you know what was clicked
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,259 posts
since Dec 2007
Sep 3rd, 2009
0

Re: Frustrated with Java

Click to Expand / Collapse  Quote originally posted by javaAddict ...
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)
  1. JButton butt = new JButton();
  2. JTextField field =new JTextField();
  3.  
  4. public void actionPerformed(ActionEvent e) {
  5. Object source = e.getSource();
  6. if (source==butt) {
  7.  
  8. } else if (source==field) {
  9.  
  10. }
  11. }

That is how you know what was clicked
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.

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.
Reputation Points: 2
Solved Threads: 0
Light Poster
and12 is offline Offline
37 posts
since Aug 2009
Sep 3rd, 2009
0

Re: Frustrated with Java

Also my Java applets won't run on machines with a Macintosh. So how do you fix that?

I AM A NEWBIE TO JAVA.
Reputation Points: 2
Solved Threads: 0
Light Poster
and12 is offline Offline
37 posts
since Aug 2009
Sep 3rd, 2009
0

Re: Frustrated with Java

I should have the right to delete my own posts. I may not be an expert JAVA program but i should have the right to delete my own posts.
Reputation Points: 2
Solved Threads: 0
Light Poster
and12 is offline Offline
37 posts
since Aug 2009
Sep 4th, 2009
0

Re: Frustrated with Java

Click to Expand / Collapse  Quote originally posted by and12 ...
Click to Expand / Collapse  Quote originally posted by javaAddict ...
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)
  1. JButton butt = new JButton();
  2. JTextField field =new JTextField();
  3.  
  4. public void actionPerformed(ActionEvent e) {
  5. Object source = e.getSource();
  6. if (source==butt) {
  7.  
  8. } else if (source==field) {
  9.  
  10. }
  11. }
That is how you know what was clicked
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.

Why didn't you answer my previous post then if you think you're so smart.
javaAddict is not insulting you, just telling the truth. Your answer is not very polite.

Click to Expand / Collapse  Quote originally posted by and12 ...
Also my Java applets won't run on machines with a Macintosh. So how do you fix that?

I AM A NEWBIE TO JAVA.
It is obvious that you are a newbie to Java, you do not have to shout it so loud.
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.

Click to Expand / Collapse  Quote originally posted by and12 ...
I should have the right to delete my own posts. I may not be an expert JAVA program but i should have the right to delete my own posts.
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.
Sponsor
Reputation Points: 40
Solved Threads: 13
Junior Poster in Training
sneaker is offline Offline
76 posts
since Jul 2009
Sep 4th, 2009
0

Re: Frustrated with Java

Click to Expand / Collapse  Quote originally posted by and12 ...
Why didn't you answer my previous post then if you think you're so smart.
What previous post? Not to mention that no one here is obligated to solve every single thread as if we have some sort of deadline. I don't know what post you are referring to, but if I didn't answer it, that was my choice. I don't have to do it.

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
Sponsor
Featured Poster
Reputation Points: 1014
Solved Threads: 446
Nearly a Senior Poster
javaAddict is offline Offline
3,259 posts
since Dec 2007
Sep 4th, 2009
0

Re: Frustrated with Java

Sorry I forgot this in my previous post...
Click to Expand / Collapse  Quote originally posted by and12 ...
... I'm sorry i don't know how to find anything on java sun docs.
I am frustrated. ...
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/
Sponsor
Reputation Points: 40
Solved Threads: 13
Junior Poster in Training
sneaker is offline Offline
76 posts
since Jul 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Why can't all people enter a char
Next Thread in Java Forum Timeline: help with Bulls and Cows game





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC