LineSet createThresh(LineSet d, int height) { LineSet thresh = new LineSet(); int num = 0; try { for (int i = 0; true; i++) { num = i; String s = d.getLabel(i); thresh.addPoint(s, height); } } catch (Exception e) { } thresh.setColor(0x000000); thresh.setSmooth(true); thresh.setThickness(5); float[] f = new float[num]; for (int i = 0; i < num; i++) { f[i] = 10; } thresh.setDashed(f); return thresh; }