locationDisplay.setFont(new Font("Arial", 0, 12));
locationDisplay.setFormat(new MessageFormat("<html><b>X:</b> {0} <b>Y:</b> {1}</html>"));
locationDisplay.attach(plot);
plot.add(locationDisplay);
SlopeLine slopeLine = new SlopeLine();
slopeLine.setForeground(Color.white);
slopeLine.attach(plot);
SlopeLineDisplay slopeLineDisplay = new SlopeLineDisplay();
slopeLine.addListenerForPlot(plot, slopeLineDisplay);
slopeLineDisplay.setFont(new Font("Arial", 0, 12));
slopeLineDisplay.setForeground(Color.white);
slopeLineDisplay.setFormat(new MessageFormat("<html><b>Δx:</b> {0} <b>Δy:</b> {1}</html>"));
plot.add(slopeLineDisplay);