• Post Reply Bookmark Topic Watch Topic
  • New Topic

Why does dialog box appear twice when PropertyVetoException is thrown?  RSS feed

 
Dora Chua
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone
I hope someone can advise me on this problem.
I'm trying to write a small application which throws a PropertyVetoException if the user chooses "No" to a Yes/NO option dialog that pops up.
The application works properly when the user chooses "Yes", but when "No" is chosen, I see the dialog box appearing twice instead of once.
I have the full source code of my program on this URL, so if someone can help me trace the problem, I would appreciate it very very much indeed.
http://www.geocities.com/porridge0003/JellyBean.java
http://www.geocities.com/porridge0003/PriceChecker.java
thanks!
Dora
 
Cindy Glass
"The Hood"
Sheriff
Posts: 8521
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In
vetos.fireVetoableChange("priceInCents", new Integer(oldPriceInCents), new Integer (newPriceInCents));
// No-one vetoed, so go ahead and make the change.
ourPriceInCents = newPriceInCents;

What is stopping them from always falling into the "no-one vetoed" logic?
[ June 16, 2003: Message edited by: Cindy Glass ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!