Try to pay attention to signs and surroundings. Nowadays, many Japanese trains have a special women-only car, marked on both the train and
the platform with a pink sign.
Additionally, some trains also have the first car designated as an "electronics off" car, where you're expected to power off your cell phone. In theory, these cars were created for the elderly who worry about interference with their pacemakers.
Lastly, be very careful about sitting in priority seats. Even if you are not sitting in a priority seat, it's good manners to stand up for older, injured, or pregnant people.
If you're worried about offending someone (the aging Japanese crowd considers themselves tough and not in need of a seat!), standing up, say "dozo" and then move a few paces away so that they don't feel the need to refuse.