conditionalise the hacky way to repaint container for just jframe