Programa Genera Aleatorios

Páginas: 2 (362 palabras) Publicado: 17 de octubre de 2011
/**
* @(#)Text1.java
*
*
* @author
* JEAB
*
*
*
* @version 1.00 2011/9/3
*/
import java.awt.*;
import javax.swing.*;
import java.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
import java.util.ArrayList;
import java.text.DecimalFormat;

public class Aleatorios extends JFrame implements ActionListener{

private JFrame FRMPRINCIPAL = newJFrame("NUMEROS ALEATORIOS");
private JTextArea JTFNUMEROS = new JTextArea(6,80);
private ImageIcon IILOGO = new ImageIcon("");
private JLabel JLBLOGO = new JLabel(IILOGO);
privateString CANTIDADNUMEROS;
private String DECIMALES;
private int NUMERO;
private int CONTADOR = 0;
private int LIMITENUMEROS = 21;
private int CANTIDADDECIMALES;
privateint LIMITEDECIMALES = 5;
private ArrayList LISTANUMEROS = new ArrayList();
DecimalFormat NFORMAT = new DecimalFormat();
private JButton JBLIMPIAR = new JButton("Limpiar");private JButton JBGENERANUMEROS = new JButton("Genera");

public Aleatorios() {

JTFNUMEROS.setLineWrap(true);
JTFNUMEROS.setWrapStyleWord(true);
JTFNUMEROS.setBounds(0,0,100,600);JBGENERANUMEROS.setBounds(100,50,200,50);
JBLIMPIAR.setBounds(100,200,200,50);
FRMPRINCIPAL.setSize(310,600);
FRMPRINCIPAL.getContentPane().setLayout(null);FRMPRINCIPAL.add(JTFNUMEROS);
FRMPRINCIPAL.add(JBGENERANUMEROS);
FRMPRINCIPAL.add(JBLIMPIAR);
FRMPRINCIPAL.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);FRMPRINCIPAL.setVisible(true);
JBGENERANUMEROS.addActionListener(this);
JBLIMPIAR.addActionListener(this);
}

public int orquestador(){

CANTIDADNUMEROS =JOptionPane.showInputDialog(null,"Cuantos numeros aleatorios quieres generar?","Ingresa un numero del 1 al 20",JOptionPane.QUESTION_MESSAGE);

if(validaNumero(CANTIDADNUMEROS) == true){

DECIMALES =...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Generador De Aleatorios
  • Generadores N Meros Aleatorios
  • Generador de numeros aleatorios
  • Generadores De Variables Aleatorias
  • Análisis Del Generador De Números Aleatorios De Java
  • Metodos Para Generar Variables Aleatorias
  • Valores Para Generadores De Números Aleatorios
  • Programa de psicologia genera

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS