I've seen this one. We have an internal IM system where I work. Last year, word came to us (from our boss, as a friendly warning) that people in other departments were looking at the IM client to see our status (if we were "away" or not) and using that to determine that we were slacking off.
So we set our away timeouts to be very high, so it looks like we're always busy, which we usually are.
Between watching programs run that may take time, reading stuff on screen, talking to other programmers next to you, etc... it can look that way.
I don't worry about, really. That's how I work (and the others around me too). That just the way things work in our department. That metric can work with some jobs (i.e. % of time in a call for a call center employee), but it doesn't work for everyone.
What can you do about it? I wouldn't do much. I like the crossword suggestion above. If you are worried about others opinions, I wouldn't be. If they are complaining/making remarks, you can try being nice (the crossword thing) but if it continues you could simply talk to you manager asking for people to basically be informed "he's doing his job, let him be". It's not the job of the clerk 3 desks over to monitor how hard you're working.
The people who watch this kind of thing are usually the same people who are slacking themselves (or at least worried they are, such as a workaholic).
As long as your boss knows you're doing a good job and doesn't think you're wasting the company's money, you should be fine.