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);
new DefaultXYLayoutGenerator().generateLayout(plot);
SpringLayout layout2 = (SpringLayout) plot.getLayout();
layout2.putConstraint(SpringLayout.NORTH, locationDisplay, 0, SpringLayout.NORTH, plot);
layout2.putConstraint(SpringLayout.WEST, locationDisplay, 0, SpringLayout.WEST, contents);
layout2.putConstraint(SpringLayout.EAST, locationDisplay, 0, SpringLayout.HORIZONTAL_CENTER, contents);