yAxis.setTickLabelFormatter(new NumberAxis.DefaultFormatter(yAxis) {

@Override
public String toString(Number object) {
return String.format("%6.4f", object);
}
...