//tamaño del grafico
Dimension d = jPanel1.getSize();//toma el tamaño del contenedor
//se crean los datos
int[] valores = {1000,2011,3030,1569,2688,4587};
String[] arg1 = {"Enero","Febrero","Marzo","Enero","Febrero","Marzo"};
String[] arg2 = {"Visitas","Visitas","Visitas","Hits","Hits","Hits"};
//titulo, lateral 1, lateral 2
String[] data = {"Blog de Robert","Primer Trimestre","Visitas"};
//se crea el grafico
migrafico.crear_grafico_de_barras(d, valores, arg2, arg1, data);
//se crea un jlabel para colocar el grafico
JLabel j = new JLabel();
j.setBounds(0, 0, d.width, d.height);
//se carga el grafico de memoria
migrafico.cargar_grafico(j);
//se añade al contenedor
jPanel1.add(j);
this.repaint();