/*

* To change this license header, choose License Headers in Project Properties.

* To change this template file, choose Tools | Templates

* and open the template in the editor.

*/

package histograma;

import javax.swing.JOptionPane;

import javax.swing.JTextArea;

/**

*

* @author Satellite

*/

public class Histograma {

/**

* @param args the command line arguments

*/

public static void main(String[] args) {

// TODO code application logic here

int arreglo[] = { 5, 3, 9, 1, 6, 12, 3, 16, 3, 1 };

String salida = "Elemento\tValor\tHistograma";

for ( int contador = 0; contador < arreglo.length; contador++ ) {

salida += "\n" + contador + "\t" + arreglo[ contador ] + "\t";

for ( int estrellas = 0; estrellas < arreglo[ contador ]; estrellas++ ){

exit( 0 ). JOptionPane. salida += "*".INFORMATION_MESSAGE ). areaSalida. } El programa: . JOptionPane. "Programa para imprimir histogramas".showMessageDialog( null. System. areaSalida.setText(salida). } } JTextArea areaSalida = new JTextArea().