public Icon get ( String url ) { StackTraceElement [ ] stacks = new Exception ( ) . getStackTrace ( ) ; try { Class callerClazz = Class . forName ( stacks [ 1 ] . getClassName ( ) ) ; return get ( callerClazz . getResource ( url ) ) ; } catch ( ClassNotFoundException e ) { throw new RuntimeException ( e ) ; } }
Gets the icon denoted by url . If url is relative it is relative to the caller .