Lord Jim is chock full of sailors following a strict behavioral code that's all about being a gentleman. As a seaman, Jim has to follow that code, too, but he chucks it overboard with his pride and himself when he abandons ship on the Patna. The problem with Jim's "gentlemanly" behavioral code is that it isn't the clearest thing in the world. Gentlemen are supposed to be honorable, dutiful, patriotic, heroic, and other vague, impressive-sounding things, but it's hard to live up to those expectations when your life is on the line. Jim actually retains all these qualities even after the Patna, but his one lapse on board defines him, regardless of how he behaves on shore. Once he violates sailors' principles, there's no going back.
Jim's actions aboard the Patna shouldn't define who he is. He proves he is a man of principle before and after that event, which was just one moment, one mistake.
Jim's actions aboard the Patna reveal the truth about who he is, unpleasant as it may be. It's how he acts under pressure that counts.