IllegalArgumentException

IllegalArgumentException It is an unchecked exception a subclass of RuntimeException. It is thrown by Color constructor when wrong parameters are passed. Observe the syntax of java.awt.Color constructor. Color clr1 = new Color(int red, int green, int blue); The RGB values should be within the range of 0 to 255 (inclusive of both). If other values …

IllegalArgumentException Read More »