Why I can not use Tab character in setText() of Footer?
Code: Select all
import javax.swing.JFrame;
import javax.swing.JPanel;
import com.steema.teechart.Footer;
import com.steema.teechart.TChart;
import com.steema.teechart.drawing.Color;
import com.steema.teechart.drawing.StringAlignment;
import com.steema.teechart.legend.LegendStyle;
import com.steema.teechart.styles.Bar;
import com.steema.teechart.styles.CustomBar;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame();
JPanel panel = new JPanel();
panel.setSize(600, 600);
TChart chart = new TChart();
chart.getLegend().setVisible(true);
chart.getLegend().setLegendStyle(LegendStyle.VALUES);
Footer footer = chart.getFooter();
footer.setVisible(true);
footer.setAlignment(StringAlignment.NEAR);
footer.setAdjustFrame(true);
footer.setText("Sample Size:12 "+"\n" +
"Std Dev:12.0 Width:23.4"+"\n"+
"Median:10.0 Min:20.0"+"\n"+
"Mean:22 Max:45"+"\n");
// footer.setText("Sample Size:12\t\t\t\t\t\t"+"\n" +
// "Std Dev:12.0\t\t\t\tWidth:23.4"+"\n"+
// "Median:10.0\t\t\t\tMin:20.0"+"\n"+
// "Mean:22\t\t\t\tMax:45"+"\n");
footer.getFont().setColor(Color.BLUE);
footer.getFont().setSize(13);
footer.getFont().setBold(true);
CustomBar pareto = new Bar(chart.getChart());
pareto.add(50, "a");
pareto.add(50, "b");
pareto.add(50, "c");
panel.add(chart);
chart.getChart().getTitle().setText("");
frame.add(panel);
frame.setSize(600, 600);
frame.setVisible(true);
}
}
Varun