protected int getScreenResolution ( Component c ) { if ( c == null ) { return getDefaultScreenResolution ( ) ; } Toolkit toolkit = c . getToolkit ( ) ; return toolkit != null ? toolkit . getScreenResolution ( ) : getDefaultScreenResolution ( ) ; }
Returns the components screen resolution or the default screen resolution if the component is null or has no toolkit assigned yet .