I took the following code from a tutorial:
import javax.swing.*; import java.util.Date; public class SwingGUI { public static void main( String[] args
Obviously the problem did not lie in the code, because it worked for everyone else. So I decided do remove and re-install java and eclipse, et voilà! Now it works. Thank you all for your feedback.