Yes, one can come out of this habit if they completely stop using the computer for some time and spend more time in outdoor activities with family and friends. But as you said they shouldn't meet people who discuss gambling then surely they can stop gambling habit soon or later.
I agree with you mate. If you only gambles online, then the best way to get out of it is to stay away online for couple of days and just do anything outdoor. If your source of income is doing online work, then you better try to find something about it - maybe you can block the gambling sites you are playing with.