Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help me!!

 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi: everyone.
I do not know why my code can not work? please help me!! thanks.
 
Stefan Krompass
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

what do you mean by "my code can not work"? Does it compile? When not, what messages are displayed by the compiler? Can you execute your program? When this is possible: How does it behave and how do you want your program to behave?

Stefan
 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi: Stefan
thanks for your reply. my code have no mistake in compile time. I want to print the text which display in JTextField when you click JButton. but it can not work when I click Button. so....
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks like your ActionListener wasn't being passed correctly

try this

 
Yanxin Zhao
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks so much, Michael.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic