Frustrated with Java

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2009
Posts: 36
Reputation: and12 has a little shameless behaviour in the past 
Solved Threads: 0
and12 and12 is offline Offline
Light Poster

Frustrated with Java

 
0
  #1
Sep 3rd, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,718
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 230
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: Frustrated with Java

 
1
  #2
Sep 3rd, 2009
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:

  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
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 36
Reputation: and12 has a little shameless behaviour in the past 
Solved Threads: 0
and12 and12 is offline Offline
Light Poster

Re: Frustrated with Java

 
0
  #3
Sep 3rd, 2009
Originally Posted by javaAddict View Post
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:

  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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 36
Reputation: and12 has a little shameless behaviour in the past 
Solved Threads: 0
and12 and12 is offline Offline
Light Poster

Re: Frustrated with Java

 
0
  #4
Sep 3rd, 2009
Also my Java applets won't run on machines with a Macintosh. So how do you fix that?

I AM A NEWBIE TO JAVA.
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 36
Reputation: and12 has a little shameless behaviour in the past 
Solved Threads: 0
and12 and12 is offline Offline
Light Poster

Re: Frustrated with Java

 
0
  #5
Sep 3rd, 2009
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.
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 48
Reputation: sneaker is an unknown quantity at this point 
Solved Threads: 7
sneaker sneaker is offline Offline
Light Poster

Re: Frustrated with Java

 
0
  #6
Sep 4th, 2009
Originally Posted by and12 View Post
Originally Posted by javaAddict View Post
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:

  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.

Originally Posted by and12 View Post
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.

Originally Posted by and12 View Post
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.
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 1,718
Reputation: javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all javaAddict is a name known to all 
Solved Threads: 230
Featured Poster
javaAddict's Avatar
javaAddict javaAddict is offline Offline
Posting Virtuoso

Re: Frustrated with Java

 
0
  #7
Sep 4th, 2009
Originally Posted by and12 View Post
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
Check out my New Bike at my Public Profile at the "About Me" tab
Reply With Quote Quick reply to this message  
Join Date: Jul 2009
Posts: 48
Reputation: sneaker is an unknown quantity at this point 
Solved Threads: 7
sneaker sneaker is offline Offline
Light Poster

Re: Frustrated with Java

 
0
  #8
Sep 4th, 2009
Sorry I forgot this in my previous post...
Originally Posted by and12 View Post
... 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/
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum


Views: 410 | Replies: 7
Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC