• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please help me with this code... I don't know what I'm missing...

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 16, 2003: Message edited by: Dirk Schreckmann ]
 
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Ivan, welcome to JavaRanch. What do you want this code to do? Compile? Run? Or What? It would be great if you could place your code between UBB code tags to preserve indentation (use spaces not tabs).
 
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When asking folks a question, taking a minute to first explain things to your Cardboard Analyst and to think about Asking a Good Question is time well spent.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Dirk! You edited all that code? You're too good to these guys!
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The requestFocus method of TextField does not take any arguments. Take a look at The TextField Class Documentation.
[ March 16, 2003: Message edited by: Dirk Schreckmann ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dirk Schreckmann:
When asking folks a question, taking a minute to first explain things to your Cardboard Analyst and to think about Asking a Good Question is time well spent.


Is there one for answering stupidquestions too?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Dirk! You edited all that code? You're too good to these guys!
JBuilder 8 makes it very easy - just highlight all and press tab.
The difficult part is waiting for the beastly program to get started.
[ March 16, 2003: Message edited by: Dirk Schreckmann ]
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dirk Schreckmann:
The requestFocus method of TextField does not take any arguments. Take a look at The TextField Class Documentation.


Hey, I was holding that back until Ivan played ball Dirk!
[ corrected my quoted typo -ds ]
[ March 16, 2003: Message edited by: Dirk Schreckmann ]
[ March 16, 2003: Message edited by: Barry Gaunt ]
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there one for answering stupid questions too?
When answering questions of those that have hit a wall and perhaps haven't yet spent a quality moment explaining things to a Cardboard Analyst and thinking about Asking a Good Question before posting out of frustration, first ask yourself, "Am I really this bored? Is my life really so lacking of a more interesting hobby? Am I using this opportunity to procrastinate the completion of something else?" After qualifying a "yes" answer to each question, then take a deep breath and help the frustrated programmer out.
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm going to print that one out, enlarge it, and stick it next to my desk at work. Love it!
 
Ivan Valderrama
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry guys, I'm new to this forum... And also a beginner to Java. At the moment I am self studying Java. Please forgive me.
The problem was that I could not compile the code. So, what was I missing?
Regards
Ivan
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome back Ivan
Read what Dirk wrote here:

Originally posted by Dirk Schreckmann:
The requestFocus method of TextField does not take any arguments. Take a look at The TextField Class Documentation.


You must fix the call of the requestFocus method. You have given an empty string as an argument. You should call the method with no parameters.
 
Cowgirl and Author
Posts: 1589
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Dirk Schreckmann:
When asking folks a question, taking a minute to first explain things to your Cardboard Analyst and to think about Asking a Good Question is time well spent.


I love the CardboardAnalyst, but you can kill two birds with one stone if you use a LIVE PET instead. Clover, my dog, knows polymorphism as a result of countless hours listening to my code and/or design problems. And let's not forget Bert the sheep, who devoured Thinking In Java start to finish back in '98. (You'll find Bert's picture at the Bunkhouse)
That way, you eventually end up with *almost* free labor. (Sure, the lack of opposable thumbs makes their mouse and keyboard skills less than ideal, but at least they can respond with a working knowledge of the language. We've started the donkey on J2EE Design Patterns).
cheers,
Kathy
"never do yourself what your Dog will do for kibbles."
 
reply
    Bookmark Topic Watch Topic
  • New Topic