This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

GUI Fluctuation problem in swing

 
vijay jamadade
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a dialogue in which i am entering values. After submit I am checking for duplicate values in database and if exist I am again creating the same dialogue. As it can happen many times. I want to continue with that code. So I have used while loop and I am checking the flag value which I get after calling action_insertok()

See the code



What should i do to avoid this. Is there any alternate way.
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is DialogFactory?
Do you encounter the same problem if you switch from DialogFactory to JOptionPane.showXXXDialog ?
 
vijay jamadade
Ranch Hand
Posts: 243
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DialogFactory is the class that we are using to get customised dialogues for our application.

Anyways the JoptionPane is working fine without fluctuation. Extremely thanks maneesh for that.

But still I am not able to get why our customized dialogue is giving fluctuations. What can be the things behind this behaviour so that I can avoid while creating customised components?
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since we dont know what DialogFactory looks like, we cannot possibly deduce can we?
You can try comparing the JOptionPane#showXXXDialog method and your DialogFactory#showDialog method to see what different way the dialog is being created and displayed. Also check if the code tweaks the paint or paintComponent methods anywhere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic