/** * Sets the position to place the icon (relative to the component contents). * * @param iconPosition must be one of the following {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. */ public void setIconPosition(int iconPosition) { if (!isValidPosition(iconPosition)) { throw new IllegalArgumentException("Invalid icon position"); } this.iconPosition = iconPosition; }
/** * Sets the position to place the icon (relative to the component contents). * * @param iconPosition must be one of the following {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. */ public void setIconPosition(int iconPosition) { if (!isValidPosition(iconPosition)) { throw new IllegalArgumentException("Invalid icon position"); } this.iconPosition = iconPosition; }
/** * Sets the position to place the icon (relative to the component contents). * * @param iconPosition must be one of the following {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. */ public void setIconPosition(int iconPosition) { if (!isValidPosition(iconPosition)) { throw new IllegalArgumentException("Invalid icon position"); } this.iconPosition = iconPosition; }
/** * Sets the position to place the icon (relative to the component contents). * * @param iconPosition must be one of the following {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. */ public void setIconPosition(int iconPosition) { if (!isValidPosition(iconPosition)) { throw new IllegalArgumentException("Invalid icon position"); } this.iconPosition = iconPosition; }
/** * Sets the position to place the icon (relative to the component contents). * * @param iconPosition must be one of the following {@code SwingConstants}: * <ul> * <li>{@code LEADING}</li> * <li>{@code TRAILING}</li> * <li>{@code EAST}</li> * <li>{@code WEST}</li> * </ul> * @throws IllegalArgumentException * if {@code iconPosition} is not a valid position. */ public void setIconPosition(int iconPosition) { if (!isValidPosition(iconPosition)) { throw new IllegalArgumentException("Invalid icon position"); } this.iconPosition = iconPosition; }