I took the following code from a tutorial:
import javax.swing.*;
import java.util.Date;
public class SwingGUI {
public static void main( String[] args
am new here. I had this problem and it took me 2 days of research. I solved it by adding an external JAR file that contains all the required components to my Eclipse. Right-click project>>Buildpath>>Configure build path>> Add external JARS and browse for the JAR file on your computer. The JAR file can be downloaded here http://www.java2s.com/Code/Jar/j/Downloadjsdgstubsjre15jar.htm Hope this helps someone out there.