SpringUtilities cannot be resolved

Leron_says_get_back_Monica picture Leron_says_get_back_Monica · Oct 31, 2012 · Viewed 14k times · Source

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.

Answer

Ti Strga picture Ti Strga · Jan 15, 2013

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