Everyone knows that Japan's economic growth has been flat for the last 20 years. What they don't realise is that Japan's GDP per capita has been rising.
Take a look at the following graph:
GDP is a function of the size of your workforce and productivity.
Japan's workforce (people aged 15-64) peaked in 1995, and it is now 10% below 1995 levels. So in order for overall GDP to be flat, they had to increase productivity to offset the workforce decline.
In 2012, their overall population started to drop. This means they're out of the most difficult phase where the workforce was declining, but the overall population was rising (due to longevity), which meant their dependency ratio was increasing. The dependency ratio is the ratio of your workforce to those who are dependents (the under 15s and over 65's).
It's interesting to see Germany doing well on that graph too. Germany also has an aging population and a declining workforce (deaths have exceeded births in Germany since the late 1970's). They have managed to cope through a mix of importing temporary workers from the rest of the EU and increasing automation.
It's also worth noting Italy at the bottom there. Italy also has a declining workforce and an aging population. Italy is what happens when your workforce declines but you don't improve productivity to compensate, and all your spare money goes towards looking after elderly dependents.