Desktop code for Java Trouble