I have experience with both. If you have a lot of luggage I recommend flying.
If you are travelling reasonably light, then train is great. You also get to see scenery, which I always find think is a good way to pass the time.
Just remember the etiquette on Japanese trains. Don't make any significant noise in the cabin. If you need to make a call move to the joining sections.