List params = (List) UIManager.get(uiProp); double g1 = ((Double) params.get(0)).doubleValue(); double g2 = ((Double) params.get(1)).doubleValue(); Color c1 = (Color) params.get(2); Color c2 = (Color) params.get(3); Color c3 = (Color) params.get(4); paintGradient(g, x, y, w, h, g1, g2, c1, c2, c3, dir);
paintGradient(g, x, y, w, h, dir, uiProp, null);
  static void paintGradient(Graphics g, int x, int y, int w, int h,                            int dir, String uiProp)  {    List params = (List) UIManager.get(uiProp);    double g1 = ((Double) params.get(0)).doubleValue();    double g2 = ((Double) params.get(1)).doubleValue();    Color c1 = (Color) params.get(2);    Color c2 = (Color) params.get(3);    Color c3 = (Color) params.get(4);    paintGradient(g, x, y, w, h, g1, g2, c1, c2, c3, dir);  }