List of usage examples for org.jfree.chart ChartPanel setFont
@BeanProperty(preferred = true, visualUpdate = true, description = "The font for the component.") public void setFont(Font font)
From source file:clienteProfessor.ClickerOne_Resultados.java
public void criaGrafico() { CategoryDataset cds = createDataset(); String titulo = "Resultado da aula: " + jComboBoxAulas.getSelectedItem(); String eixoy = "Quantidade de escolhas"; String txt_legenda = "Legenda:"; boolean legenda = true; boolean tooltips = true; boolean urls = true; JFreeChart graf = ChartFactory.createBarChart3D(titulo, txt_legenda, eixoy, cds, PlotOrientation.VERTICAL, legenda, tooltips, urls);/* w w w .ja v a2s . co m*/ //JFreeChart graf = ChartFactory.createBarChart3D(titulo, txt_legenda, eixoy, cds, PlotOrientation.VERTICAL, legenda, tooltips, urls); ChartPanel myChartPanel = new ChartPanel(graf, true); myChartPanel.setSize(jPanel1.getWidth(), jPanel1.getHeight()); myChartPanel.setVisible(true); myChartPanel.setFont(new Font("Arial", Font.PLAIN, 25)); myChartPanel.setBackground(this.getBackground()); jPanel1.removeAll(); jPanel1.add(myChartPanel); jPanel1.revalidate(); jPanel1.repaint(); }