Simplify createImageIcon so that it uses a map instead of an
if-then-else.