Update WidgetResource.java

fixes #5873