Code samples in swing and applets