Set background color when frame size is different from requested size

Contributed with tests by @holmes in pull request #1, some tweaks made
(DRY in the test, scoping test dependencies to 'test' in the pom,
minimised pom.xml diff size by removing whitespace changes)