Could be a number of things.
As Mandie has said, the tablets themselves contain no (or next to no) energy (that is calories/kilojules) so in themselves won't make you fat (that is they themselves don't add any energy to your intake).
They MAY impact on your metabolism though which will alter the balance of energy in energy out for you (that is what you were eating and exercising before to balance and maintain weight is no longer sufficient and the same food and same exercise is now, because of the change in your metabolism, out of balance in favour of energy in - too much food - so you gain). That is, they MAY influence weight gain by secondary processes.
Yes this may be pedantic, but it gets to the core of the "why do I gain weight" issue. The cause of weight gain is taking in more energy than you expend. That's it. This is complicated by other things which affect the body's ability to absorb or use the energy which affects this balance (metabolism) - these can include genetics, medications, medical problems, age, muscle mass etc. Some of these things are controllable, others aren't (You can't change your genes and family history, but you CAN increase muscle mass, adjust medications etc).
Hypothesising here, but looking at the drug info and side effects, this drug is a non-steroidal anti-inflammatory. It has known side effects in the gastrointenstinal tract so it may affect the absorption of nutrients. It also has mood effects which indicated a hormonal or neurotransmitter effect - hormones can alter weight gain and neurotransmitters may affect mood. Mood can have an effect on appetite and also on how much attention you pay to what you are eating/doing so you don't notice very subtle changes in your diet which are enough to tip the balance over to make you gain. You would be surprised how little extra you need to eat, or how small a decrease in exercise will lead to weight gain.
The other thing is why you were taking the meds and a cause and effect thing. If you were taking them for an injury/illness, could that injury have decreased your exercise? The other interesting thing is that I've seen articles that tentatively link being overweight with increased pain sensitivity, this is a tentative hypothesis of course, but it MIGHT be possible that the weight gain was triggering pain leading to your use of meds, not the other way round (correlation - that is a link between two things - can't tell you which caused the other).
It might also be due to another unrelated factor. For example, if you were ill/injured and as a result stayed with a friend/family to help care for you, they may well have cooked different things to what you would normally eat.
So yes, the medication may have been linked, but purely in and of themselves, the pills wouldn't have given you any extra kilojules to your diet and are therefore not 'fattening', though they may have effects on other things that affect your metabolism of things that ARE fattening/slimming (i.e. food and exercise).
35kg lost. (November 2005 - October 2006)
15kg gained again (as at October 2010).
Back to the drawing board - Let's do this thing!
"You can't change the winds, but you can change the sails"
"Reach out and take control of what lands in your lap"