Removed deprecated Swing API calls. No replacement needed. Also cleaned the code a little.