IHorizontalLineChartObject interface has no method to write text below the line - it is only possible to write some text on the top of it. Consider the following method which writes the text on top of the line.
private void drawHLine(IChart chart, String name, double price, long time) throws JFException {
if (chart == null ) {
return;
}
IChartObjectFactory factory = chart.getChartObjectFactory();
IHorizontalLineChartObject hline = factory.createHorizontalLine("NewhlineKey", price);
hline.setColor(Color.RED);
hline.setPrice(0, price);
hline.setTime(0, time);
hline.setText(" hline text ", SwingConstants.CENTER);
chart.addToMainChart(hline);
}