Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

almost done

 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get this gui to work, but my listeners are not working. My program is just crashing. Can someone look at it and tell me where I am going wrong.Here are my listeners
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you should post the error messages, but this part is wrong
if(value.equals(null))

as 'value' is the return from getText(), it could be empty, not null
if(value.equals(""))

if checking for null, it would be
if(value == null)
 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found that error you saw just a minute ago. But it still doesn't work and here are the error messages
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
firstly, "almost done" is not a useful topic at all. You should browse the pointers on asking questions on the Ranch as it will help you get answers.

You should print the value of "sc" each time before using it. I am not sure you re getting the behaviour you expect.
 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you mean I should print it out
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


If it prints out "sc is null" you have found your problem.
 
Victoria Preston
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found my problem thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic