MLK and Gandhi did not submit to punishment as a method to convince others to join them in disobedience. (This would be rather counterproductive, wouldn't it?) They did it to draw attention to injustice from the public, the vast majority of whom would not join them in disobedience.
MLK and Gandhi did not make the moral claim that the punishment was just--they would say the opposite--they claimed that their own actions were only just because they accepted this (unjust) punishment.
EDIT (reply to grimtrigger): You would argue, then, that MLK's followers (or their followers' followers) would be justified in fleeing? I don't think so.
No, my point isn't that they submitted to punishment as a method to convince other to join them.
My point is that they Accepting submitting to punisment as a method to convince others to join them.
Lets say they did what Snowden did and fled the country. Both may of had the means, but their potential constituencies did not. MLK/Ghandi said "I'll stick around and accept the punishment, because thats a path others can follow".
It wasn't MLK or Ghandi breaking the law that changed anything. It was their millions of supporters breaking the law that had the effect.
MLK and Gandhi did not make the moral claim that the punishment was just--they would say the opposite--they claimed that their own actions were only just because they accepted this (unjust) punishment.
EDIT (reply to grimtrigger): You would argue, then, that MLK's followers (or their followers' followers) would be justified in fleeing? I don't think so.