The short answer is: Yes, most of the time.
Only 5% of diabetic people have Type 1 diabetes, which can't be prevented; but Type 2 is usually very dependent on lifestyle. A good diet and 30 minutes of exercise each day should be enough to sustain a good health away from diabetes. If you're overweight, you are at a much higher risk of, so weight loss is key! A bad lifestyle is not worth the complications from diabetes so hop on that treadmill and get those veggies!