Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

code correction!

 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
if((int)msg.getPercentageCompleted() < 100 )
{
this.progressCounter = this.progressCounter + 20;
parentDlg.updateProgress(msg.getMessage(),progressCounter,100);
}

/***********getPercentageCompleted returns values******************/
suppose i want to go inside to increment progressCounter with the above condition and if there is one more condition

ie********* progressCounter should cease functioning untill getPercentageCompleted sends 100*** getPercentageCompleted sends information in a random way**********************/
 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the pattern is as follows

getpercentageCompleted sending
0---- we increment 20
0---- 40
0---- 60
0---- 80
0----/****from here on we should retain 80 till getpercentagecompleted
0 sends 100************/
0 /*** ie it should be 80
0-----80
0
0
0
0
0----
100
 
pras
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please help guys
 
Mark Garland
Ranch Hand
Posts: 226
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure that I understand the question.
 
Srikanth Basa
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
prasanna can you please take some time to properly draft the question. I also don't understand what you need.

If you have to post some code you can use the tags code tags.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes please!

Can you please be a bit patient on letting others know about your requirement clearly? so that it will really help the people to help you quickly.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic