- try
- {
- //
- // FIXME: Why not use ColorUtils.parseColourString(bgcolourstring) - this is consistent and backwards compatible
- //
- if (bgcolourstring.charAt(0) == '#')
- {
- bgcolour = Color.decode(bgcolourstring);
- }
- else
- {
- Field field = Color.class.getField(bgcolourstring);
- bgcolour = (Color) field.get(null);
- }
- } catch (IllegalArgumentException | NoSuchFieldException
- | SecurityException | IllegalAccessException nfe)