Search code examples
javaapispringlayout

SpringUtilities cannot be resolved


I'm trying one of the Oracle's GUI examples that uses SpringUtilities. But the Eclipse gives me and error Cannot resolve to type and when I try to compile I get SpringUtilities cannot be resolved. I'm using 1.7 JDK, guess I have to add something somewhere but I can't find much info about this problem on the internet.


Solution

  • SpringUtilities isn't included in the JDK/JRE. It's used in their SpringLayout tutorial,

    http://docs.oracle.com/javase/tutorial/uiswing/layout/spring.html

    The source is linked to from that page, and can be viewed at

    http://docs.oracle.com/javase/tutorial/uiswing/examples/layout/SpringGridProject/src/layout/SpringUtilities.java