Some changes to make the swing library work.