elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Tutorial básico de Quickjs


  Mostrar Mensajes
Páginas: [1] 2 3 4 5 6
1  Programación / PHP / como forzar la descarga de ficheros de extensiones multiples con PHP? en: 15 Octubre 2011, 06:59 am
Buenas a todos,he estado realizando un scrip que se me ocurrio que tal vez se pueda hacer o tal vez,me paso por la mente,el scrip que quiero hacer es algo sobre descarga de archivos multiples con php o forzar la descarga de multiples extensiones esto es lo que se hace al pasarle un valor a este codigo y forza la descarga

Código
  1. <?php
  2. $enlace ="/".$id;
  3.  
  4. header ("Content-Disposition: attachment; filename=".$id." ");
  5.  
  6. header ("Content-Type: application/octet-stream");
  7.  
  8. header ("Content-Length: ".filesize($enlace));
  9.  
  10. readfile($enlace);
  11.  
  12. ?>
  13.  
  14.  
y esta demas decir que para utizarlo se le pasa la ruta dowload?id=nombrearchivo.x

pero ahora viene lo bueno,lo que yo quiero hacer es que!
lo primero seria renombrar nuestro archivo download_multiple.php y con ese archivo cuando yo lo ejecute que me descargue todo lo que se encuentra en ese directorio ya sean .png,.jpg,.zip,.rar,.pdf,.mp3,.css  ficheros de multiples extensiones por asi decirlo!

buscando me he encontrado con unos codigos que tal vez alguno de ustedes expertos en el area me pudiera sugerir este es con que estoy tratando:

Código
  1. <?php
  2. $file = $_SERVER["DOCUMENT_ROOT"].'/.../.../'.$_GET['file'];
  3.  
  4. if(!file) { // File doesn't exist, output error die('file not found'); } else {
  5.  
  6. //$file_extension = strtolower(substr(strrchr($file,"."),1));
  7. $file_extension = end(explode(".", $file));
  8.  
  9. switch( $fileExtension)
  10. {
  11. case "pdf": $ctype="application/pdf"; break;
  12. case "exe": $ctype="application/octet-stream"; break;
  13. case "zip": $ctype="application/zip"; break;
  14. case "doc": $ctype="application/msword"; break;
  15. case "xls": $ctype="application/vnd.ms-excel"; break;
  16. case "ppt": $ctype="application/vnd.ms-powerpoint"; break;
  17. case "gif": $ctype="image/gif"; break;
  18. case "png": $ctype="image/png"; break;
  19. case "jpeg":
  20. case "jpg": $ctype="image/jpg"; break;
  21. default: $ctype="application/force-download";
  22. }
  23.  
  24. nocache_headers();
  25.  
  26. // Set headers
  27. header("Pragma: public"); // required
  28. header("Expires: 0");
  29. header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
  30. header("Cache-Control: public"); // required for certain browsers
  31. header("Content-Description: File Transfer");
  32. header("Content-Type: $ctype");
  33. header("Content-Disposition: attachment; filename=".$file.";" );
  34. header("Content-Transfer-Encoding: binary");
  35. header("Content-Length: ".filesize($file));
  36.  
  37. readfile($file);
  38. } ?>
  39.  
  40.  
lo que entiendo por este codigo es que me descarga esos tipos de formatos de archivos,pero no se como implementarlo  tambien encontre algo asi creando un arreglo de extensiones de archivos

Código:
<?php
    $extensiones = array("PNG","zip","doc","rar","jpg");
    $f = $_GET["f"];
    if(strpos($f,"/")!==false){
        die("No puedes navegar por otros directorios");
    }
    $ftmp = explode(".",$f);
    $fExt = strtolower($ftmp[count($ftmp)-1]);

    if(!in_array($fExt,$extensiones)){
        die("<b>ERROR!</b> no es posible descargar archivos con la extensión $fExt");
    }

    header("Content-type: application/octet-stream");
    header("Content-Disposition: attachment; filename=\"$f\"\n");
    $fp=fopen("$f", "r");
    fpassthru($fp);
?>



pero no me funciona siempre me manda aqui y no entiendo si tengo todo bien   
 die("<b>ERROR!</b> no es posible descargar archivos con la extensión $fExt");

y otra cosa que me gustaria implementar es listar todos los archivos de ese directorio para eso lo hago asi:

Código:
<?php
echo "<h3>Index</h3>\n";
echo "<table>\n";
$directorio = opendir(".");
while ($archivo = readdir($directorio))
   {
   $nombreArch = ucwords($archivo);
   $nombreArch = str_replace("..", "Atras", $nombreArch);
   echo "<tr>\n<td>\n<a href='$archivo'>\n";

   echo " border=0>\n";
   echo "<b>&nbsp;$nombreArch</b></a></td>\n";
   echo "\n</tr>\n";
   }
closedir($directorio);
echo "</table>\n";
?>


de esta manera me lista todo el directorio y de ahi partir para forzar la descarga de todos  los ficheros con extensiones que contenga la carpeta! he estado leyendo el api de php pero viene algo parecido pero no le entiendo muy bien! http://php.net/manual/en/function.readfile.php
bueno seguire buscando como implementar para descargar multiples archivos o ficheros con direntes extensiones saludos xd y de antemano gracias!
2  Programación / Java / Validar un archivo txt que solo contenga 1 y 0,para dibujar una img? en: 12 Septiembre 2011, 16:33 pm
Hola,saludos XDs!
Bueno estoy tratando de solucionar esto,se trata de poder validar un archivo de texto que contiene 1 y 0 que conforman una imagen,donde de un programa java lo mando a llamar y me pinta la imagen en un jpanel,ahora lo que yo quiero hacer es poder validarlo que si esta en el archivo 0111*+´/ cualquier otro simbolo me marque error para esto trate de hacer lo siguiente:
Código
  1.  
  2.   import java.text.*;
  3.   import java.util.*;
  4.   import java.awt.*;
  5.   import java.awt.event.*;
  6.   import java.io.*;
  7.   import java.util.StringTokenizer;
  8.   import javax.swing.*;
  9.   import javax.swing.JFileChooser;
  10.  
  11.  
  12. // Clase
  13.    class dibujo extends Frame  {
  14.      static String cad=" ";
  15.      public static String dir="";
  16.  
  17.   // Función de control de la aplicación
  18.       public static void main( String[] gll ) throws IOException{
  19.  
  20.  
  21.  
  22.         try{
  23.  
  24.  
  25.            dir= JOptionPane.showInputDialog(null,"Escribe solo el nombre del archivo a ejecutar"+" ","micky.isc");
  26.  
  27.            int a=dir.length(),b=a-4;
  28.            String sub=dir.substring(b,dir.length()),sub2=".isc";
  29.            System.out.println(sub);
  30.  
  31.            if (sub.equals(sub2)){
  32.                  //compara imagen        
  33.               FileReader ab = new FileReader(dir);
  34.               BufferedReader cd = new BufferedReader(ab);
  35.  
  36.               int numlineas = 0,total=0;
  37.               String Cadena="";
  38.  
  39.               while ((Cadena = cd.readLine())!=null) {
  40.                  numlineas++;  
  41.                  cad += Cadena+"\n";
  42.  
  43. aqui en el while no se si desde aqui lovalido ya que me lee el archivo txt...
  44.               }
  45.  
  46.            }
  47.            else
  48.            {
  49.               JOptionPane.showMessageDialog(null, "Formato no Reconocido","Error",JOptionPane.ERROR_MESSAGE);
  50.               System.exit(0);
  51.            }
  52.  
  53.         }
  54.             catch (FileNotFoundException e){
  55.               e.printStackTrace();
  56.            }
  57.             catch (IOException d){
  58.               d.printStackTrace();
  59.            }
  60.  
  61.         new dibujo();
  62.      }
  63.  
  64.       public dibujo() {
  65.  
  66.         this.setTitle( "Dibujo" );
  67.         this.setSize( 350,350 );
  68.  
  69.         this.setVisible( true );
  70.  
  71.  
  72.  
  73.         this.addWindowListener(
  74.                new WindowAdapter() {
  75.                   public void windowClosing( WindowEvent evt ) {
  76.                     System.exit( 0 );
  77.                  }
  78.               } );
  79.      }
  80.  
  81.  
  82.       public void paint(Graphics g){
  83.  
  84.         g.translate( this.getInsets().left,this.getInsets().top );
  85.  
  86.         byte[] sep = cad.getBytes();
  87.         String acep="falso";
  88.  
  89.         System.out.println ("hacker    " +sep[2]);
  90.  
  91.  
  92.         if (cad.length() >= 1000){
  93.  
  94.            int x=0,y=0;
  95.            for(int i=0; i<sep.length; i++){
  96.  
  97.  
  98.  
  99.               if (sep[i] == 48 || sep[i] == 49  || sep[i]==10  ||sep[i]==255 )
  100.               {
  101.  
  102.                  if (sep[i]==48){
  103.                     g.setColor(Color.white);
  104.                     g.fillRect( x+70,y+50,1,1);
  105.                     x=x+1;
  106.                  }
  107.  
  108.                  if (sep[i] == 49){
  109.  
  110.                     g.setColor(Color.black);
  111.                     g.fillRect( x+70,y+50,1,1 );
  112.                     x=x+1;
  113.                  }
  114.  
  115.  
  116.  
  117.  
  118.                  if (sep[i]== 10){
  119.                     y=y+1;
  120.                     x=0;
  121.                  }
  122.  
  123.  
  124.               }////
  125.               else{  
  126.      /////////////////////
  127. aqui esta mi duda le digo que si existe cualquier digito o caracter de 48=1 y 49=0
  128. me mande error pero no entra en el ciclo mi pregunta es por que!            
  129.                  if (!(sep[i]==48)&&!(sep[i] == 49)){
  130.                  System.out.println("eror"+sep[i]);
  131.                  }
  132.  
  133.  
  134.  
  135.                  System.out.println("error");
  136.               }
  137.  
  138.  
  139.  
  140.            }  
  141.  
  142.         }
  143.         else
  144.         {
  145.            JOptionPane.showMessageDialog(null,"Tu Imagen no es la Correcta","Mensage",JOptionPane.INFORMATION_MESSAGE);
  146.            System.exit(0);
  147.  
  148.         }
  149.      }
  150.   }
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  

bueno espero me haya dado entender,espero me puedan ayudar...saludos...
3  Programación / Java / como limpiar datos de un jtable al cerrar una ventana que es jpanel?? en: 6 Junio 2011, 14:55 pm
hola buenas manes bueno me quede algo atoradoi y queria ver si alguien tiene una idea de como lo puedo hacerlo que necesito hacer es que cuado cierro un jpanel lo que se habia cargdo en jtable yal cerrarlo me lo vacie me lo deje igual bueno he intentado hacerlo asi
Código
  1.  
  2. bueno primero en otra clase lo declaro con esto
  3.  
  4.      private DefaultTableModel modelo_pro;
  5. y para ocuparlo lo ocupo asi de esta manera
  6.  
  7. modelo_pro = new DefaultTableModel();
  8.  
  9.  
  10.   modelo_pro.addColumn("Nombre de imagen");
  11.         modelo_pro.addColumn("Nombre de usuario");
  12.  
  13. y le paso el modelo...
  14.  
  15.         jTable2.setModel(modelo_pro);
  16. y con esto lo agrego o lo cargo al jtable
  17.  
  18.  
  19.  
  20.  
  21. public void addProceso(String app, String usuario){
  22.         Object [] fila = new Object[2];
  23.         fila[0] = app;
  24.         fila[1] = usuario;
  25.         modelo_pro.addRow ( fila ); add row para agregar
  26.      }
  27.  

pero no me la elimina bueno  habia escuchado algo asi pero no se como implementa esto
Código
  1.  
  2. por ejemplo estaba intentado que cuando se cierre la aplicacion,me limpie el jtable para esto estaba viendo la manera de hacer algo asi pero no me sale..
  3. que cuando lo cierre me limpie el jtable....
  4.  
  5.  private  class FrameListener extends WindowAdapter
  6. {
  7.        @Override
  8.    public void windowClosing ( WindowEvent e )
  9.   {
  10.  
  11.       DefaultTableModel model = (DefaultTableModel)jTable3.getModel() ;
  12.  
  13. model.setRowCount(0) ;
  14.  
  15.   }
  16. }
  17.  
bueno aqui dejo una imagen que una imagen vale mas que mil palabras que cuando cierre l jpanel me limplie el jtable  con los datos cargados de esa ventana


aver si alguien me ayuda en esa parte muchas gracias
4  Programación / Java / como pasar un resulset a un jcombobox dentro de jtable? en: 20 Mayo 2011, 18:26 pm
hola bueno,que tal, me surgio otra duda...ahora implemente lo que muchos preguntan,como tener un jcombobox a un jtable....


ahora si yo cargo los items de mi base de datos de esta manera....normalmente

Código
  1. public void cargarcombo(JComboBox jcbclave_product){
  2. try{
  3.            Class.forName (driver);
  4.  
  5.            con = DriverManager.getConnection (url,user,pass);
  6.            System.out.println ("su conexion ha sido muy exitosa"+con);
  7.            stmt = con.createStatement();
  8.  
  9.  
  10. rs = stmt.executeQuery("SELECT clave FROM productos");
  11. jcbclave_product.removeAllItems();
  12. jcbclave_product.addItem("<-Seleccionar->");
  13.  
  14. while(rs.next()==true){
  15.  
  16.    jcbclave_product.addItem(rs.getObject(1));
  17.  
  18.  
  19.  
  20.         }//fin del while
  21.         } catch (Exception e){
  22.               e.printStackTrace();
  23.  
  24.  
  25.            }//fin del try
  26.  
  27.  
  28.  
  29. }
  30.  
  31.  

y ahora mando a traer mi metodo asii

Código
  1. esto lo pongo en initscomponents
  2.    bd.cargacombo(jcbclave_product);
  3.  


ahora mi pregunta es...


como le paso los datos a un jcombobox que esta en un jtable?eso es lo que no entiendo como hacerlo...


Código
  1. yo el agrego el jcombobox en estas lineas
  2. ESTOS SON LOS datos que tiene
  3. public static final String[] DATA = { "Dato 1", "Dato 2", "Dato 3", "Dato 4" };
  4.       DefaultCellEditor defaultCellEditor=new DefaultCellEditor(comboBox);
  5.  
  6. //le digo que la COLUMNA 4 LO VA A TENER
  7.         tabla.getColumnModel().getColumn(4).setCellEditor(defaultCellEditor);
  8.  
  9.  
  10.  

ahora mi pregunta...como se lo implemento con la consulta que yo tengo vere la manera de hacerlo eso es lo que no entiendo..bueno gracias saludos
5  Programación / Java / Re: como generar un modelo de jtable? en: 20 Mayo 2011, 16:10 pm
listo men,ahi ya lo solucione..con tu ayuda...gracias XD,saludos,,aqui lo dejo por si mas adelante a alguien lo necesita,digan que el hacker es la mejor pagina de toda la red y comunidad de hablahispana..saludos  men...bye

Código
  1. package levsym.Modulos.Interfaz.catalogo;
  2.  
  3. import java.text.SimpleDateFormat;
  4. import java.util.GregorianCalendar;
  5. import javax.swing.JTable;
  6. import javax.swing.table.DefaultTableModel;
  7.  
  8.  
  9. public class estado extends javax.swing.JInternalFrame {
  10.  
  11.  
  12.  
  13.      DefaultTableModel datos = new DefaultTableModel(); // se introduce
  14.   // este elemento para tener el control de los metodo addRow y removeRow en JTABLE
  15.  
  16.  
  17.    public estado() {
  18.  
  19.        initComponents();
  20.          String columNames[]={"clave","nombre_categ","descripcion","descripcion","descripcion"};
  21.    datos.setColumnIdentifiers(columNames);
  22.    tabla.setModel(datos);
  23.  
  24.  
  25.    }
  26.  
  27.    @SuppressWarnings("unchecked")
  28.    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  29.    private void initComponents() {
  30.  
  31.        jPanel1 = new javax.swing.JPanel();
  32.        jLabel1 = new javax.swing.JLabel();
  33.        jtxt_pagos = new javax.swing.JTextField();
  34.        jLabel7 = new javax.swing.JLabel();
  35.        jLabel8 = new javax.swing.JLabel();
  36.        jtxt_importe = new javax.swing.JTextField();
  37.        jtxt_cobrador = new javax.swing.JTextField();
  38.        jScrollPane1 = new javax.swing.JScrollPane();
  39.        tabla = new javax.swing.JTable();
  40.        jLabel11 = new javax.swing.JLabel();
  41.        jTextField11 = new javax.swing.JTextField();
  42.        b1 = new javax.swing.JButton();
  43.  
  44.        setTitle("Estados de Cuenta");
  45.  
  46.        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Estados de Cuenta"));
  47.  
  48.        jLabel1.setText("No.pagos");
  49.  
  50.        jLabel7.setText("importe");
  51.  
  52.        jLabel8.setText("cobrador");
  53.  
  54.        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
  55.        jPanel1.setLayout(jPanel1Layout);
  56.        jPanel1Layout.setHorizontalGroup(
  57.            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  58.            .addGroup(jPanel1Layout.createSequentialGroup()
  59.                .addContainerGap()
  60.                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  61.                    .addComponent(jLabel1)
  62.                    .addComponent(jLabel7)
  63.                    .addComponent(jLabel8))
  64.                .addGap(198, 198, 198)
  65.                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  66.                    .addComponent(jtxt_cobrador, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
  67.                    .addComponent(jtxt_pagos, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
  68.                    .addComponent(jtxt_importe, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
  69.                .addContainerGap(69, Short.MAX_VALUE))
  70.        );
  71.        jPanel1Layout.setVerticalGroup(
  72.            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  73.            .addGroup(jPanel1Layout.createSequentialGroup()
  74.                .addGap(20, 20, 20)
  75.                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  76.                    .addComponent(jLabel1)
  77.                    .addComponent(jtxt_pagos, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  78.                .addGap(66, 66, 66)
  79.                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  80.                    .addComponent(jtxt_importe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  81.                    .addComponent(jLabel7))
  82.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 31, Short.MAX_VALUE)
  83.                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  84.                    .addComponent(jtxt_cobrador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  85.                    .addComponent(jLabel8))
  86.                .addGap(19, 19, 19))
  87.        );
  88.  
  89.        tabla.setModel(new javax.swing.table.DefaultTableModel(
  90.            new Object [][] {
  91.  
  92.            },
  93.            new String [] {
  94.  
  95.            }
  96.        ));
  97.        tabla.getTableHeader().setReorderingAllowed(false);
  98.        tabla.addMouseListener(new java.awt.event.MouseAdapter() {
  99.            public void mouseClicked(java.awt.event.MouseEvent evt) {
  100.                tablaMouseClicked(evt);
  101.            }
  102.        });
  103.        jScrollPane1.setViewportView(tabla);
  104.  
  105.        jLabel11.setText("Saldo Actual:");
  106.  
  107.        b1.setText("Eliminar Todo");
  108.        b1.addActionListener(new java.awt.event.ActionListener() {
  109.            public void actionPerformed(java.awt.event.ActionEvent evt) {
  110.                b1ActionPerformed(evt);
  111.            }
  112.        });
  113.  
  114.        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  115.        getContentPane().setLayout(layout);
  116.        layout.setHorizontalGroup(
  117.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  118.            .addGroup(layout.createSequentialGroup()
  119.                .addGap(30, 30, 30)
  120.                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE)
  121.                .addContainerGap(113, Short.MAX_VALUE))
  122.            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  123.                .addContainerGap(384, Short.MAX_VALUE)
  124.                .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
  125.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
  126.                .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
  127.                .addGap(128, 128, 128))
  128.            .addGroup(layout.createSequentialGroup()
  129.                .addGap(20, 20, 20)
  130.                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  131.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  132.                .addComponent(b1)
  133.                .addContainerGap(144, Short.MAX_VALUE))
  134.        );
  135.        layout.setVerticalGroup(
  136.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  137.            .addGroup(layout.createSequentialGroup()
  138.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
  139.                    .addGroup(layout.createSequentialGroup()
  140.                        .addContainerGap()
  141.                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  142.                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED))
  143.                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
  144.                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
  145.                        .addComponent(b1)
  146.                        .addGap(31, 31, 31)))
  147.                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
  148.                .addGap(31, 31, 31)
  149.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  150.                    .addComponent(jLabel11)
  151.                    .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  152.                .addContainerGap(27, Short.MAX_VALUE))
  153.        );
  154.  
  155.        pack();
  156.    }// </editor-fold>                        
  157.  
  158.    private void tablaMouseClicked(java.awt.event.MouseEvent evt) {                                  
  159.  
  160.    }                                  
  161.  
  162.    private void b1ActionPerformed(java.awt.event.ActionEvent evt) {                                  
  163.  
  164.         if (evt.getSource()== b1)
  165.         {
  166.           int no_pag = Integer.parseInt(jtxt_pagos.getText());
  167.            int importe = Integer.parseInt(jtxt_importe .getText());
  168.            int no_cobr= Integer.parseInt(jtxt_cobrador.getText());
  169.  
  170.  
  171.  
  172.            GregorianCalendar c = new GregorianCalendar();
  173.            c.add(c.MONTH,1);
  174.            for(int f=0;f <no_pag ; f ++ ) {
  175.               Object []num={};
  176.               datos.addRow( num );
  177.              tabla.setValueAt( String.valueOf(f),f,0);
  178.               tabla.setValueAt(importe,f,3);
  179.               tabla.setValueAt(no_cobr,f,4);
  180.  
  181.               SimpleDateFormat d1 = new SimpleDateFormat("dd-MM-yyyy");
  182.  
  183.            //java.util.Date fecha=new Date();
  184.  
  185.               if(!(f==0))c.add(c.DAY_OF_YEAR,15);
  186.  
  187.               tabla.setValueAt(c.get(GregorianCalendar.DAY_OF_MONTH)+"/"+c.get(c.MONTH)+"/"+c.get(c.YEAR),f,1);
  188.            //jt.setValueAt("adasdfdsa",f,1);
  189.  
  190.  
  191.            //jt.setValueAt(d1.format(fecha),f,1);
  192.            }
  193.         }
  194.  
  195.    }                                  
  196.  
  197.  
  198.  
  199.  
  200.    // Variables declaration - do not modify                    
  201.    private javax.swing.JButton b1;
  202.    private javax.swing.JLabel jLabel1;
  203.    private javax.swing.JLabel jLabel11;
  204.    private javax.swing.JLabel jLabel7;
  205.    private javax.swing.JLabel jLabel8;
  206.    private javax.swing.JPanel jPanel1;
  207.    private javax.swing.JScrollPane jScrollPane1;
  208.    private javax.swing.JTextField jTextField11;
  209.    private javax.swing.JTextField jtxt_cobrador;
  210.    private javax.swing.JTextField jtxt_importe;
  211.    private javax.swing.JTextField jtxt_pagos;
  212.    private javax.swing.JTable tabla;
  213.    // End of variables declaration                  
  214.  
  215. }
  216.  
  217.  
  218.  
  219.  
  220.  


bye men :D :D :D
6  Programación / Java / Re: como generar un modelo de jtable? en: 18 Mayo 2011, 17:17 pm
alguien que se compadezca de esta pobre alma,nadie se compadeze de esta pobre alma....bueno entonces como nadie responde eso quiere decir que no me entienden..cambiare mi pregunta entonces para que me entiendan...

como puedo agregar filas dinamicamente a un jtable
tengo un jtextfield
si anoto 10 en el jtextfield que se generen 10 celdas osea 10 filas
hacer un for  o eso estoy buscando eso es dinamicamente
alguien que me pudiera decir?
gracias manes
7  Programación / Java / Re: como generar un modelo de jtable? en: 17 Mayo 2011, 07:51 am
o wowwwww men sapitooo siempre iluminandome y nunca dejandome morir solooo..compadeciendote de esta pobre alma que apenas va subiendo o queriendo subir...todas las palabras las lei una y otra vez y si voy a tomar todos tus consejos:
1.-trabajar sin IDES
2.-leer codigo a mano
3.-crear entidados
4.-utlizar setters y geters
5.-modelar bien el sistema
6.-utilizar bien los metodos de cada componente
7.-y estudiar mucho masss :( :(

bueno mira ocupe por lo mientras el metodo que me dijste y te traigo mi primer intento
esto lo puse en el metodo mouseclicked de jtable
Código
  1. private void tablaMouseClicked(java.awt.event.MouseEvent evt) {                                  
  2.  
  3.  
  4.   double total=0;
  5. for (int fila=0; fila < dtm.getRowCount(); fila++) {
  6.   total =  (double) (double) (total + (Double) dtm.getValueAt(fila, 2)); // la columna 2 es la de costo.
  7.   this.montocompra.setText(Double.toString(total));
  8. }
  9.  
  10.        Double iva = (Double) tabla.getValueAt(tabla.getSelectedRow(), 1);
  11.  
  12.  
  13.  
  14.        jTextFieldIVA.setText(Double.toString(iva));
  15.  
  16.  
  17.  
  18.        Double costo = (Double) tabla.getValueAt(tabla.getSelectedRow(), 2);
  19.  
  20.  
  21.        jTextFieldCosto.setText(Double.toString(costo));
  22.  
  23.  
  24.    }                                  
  25.  
  26.  
  27.  
  28.  

y ahora aqui esta mi imagen para ver si me dices si es bien camino o no la manera de atacar el problema...
por ejmplo escribo el valor en el jtexfield y cuando doy click en cada cela me lo pone voy a intentarle como tu me acabas d comentar pasarlo a un defaultable model..aver que tal me va y te vengo a contar saludos y gracias men de vrdd gracias men  ;-)
8  Programación / Java / como generar un modelo de jtable? en: 17 Mayo 2011, 05:55 am
hola manes  buenas manes...me quede atorado espero aver si alguien me puediera ayudar si no es mucha molestia.. lo que quiero hacer es si alguien me puede sugerir una manera de genrar este modelo de tabla insertando los datos de un jtable bueno este sistema lo estoy pasando a java y me pregunto como esto lo hago con java....



bueno ahora pongo la imagen que tengo hasta ahorita en java




y ahora mi codigo de la tabla que llevo hasta el momento..

Código:


public class estadodeclientes extends javax.swing.JInternalFrame {


    public estadodeclientes() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jTextField1 = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        jTextField2 = new javax.swing.JTextField();
        jLabel3 = new javax.swing.JLabel();
        jTextField3 = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jTextField4 = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jTextField5 = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jLabel10 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jTextField6 = new javax.swing.JTextField();
        jTextField7 = new javax.swing.JTextField();
        jTextField8 = new javax.swing.JTextField();
        jTextField9 = new javax.swing.JTextField();
        jTextField10 = new javax.swing.JTextField();
        jScrollPane1 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        jLabel11 = new javax.swing.JLabel();
        jTextField11 = new javax.swing.JTextField();

        setTitle("Estados de Cuenta");

        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Estados de Cuenta"));

        jLabel1.setText("Cliente:");

        jLabel2.setText("Factura:");

        jLabel3.setText("Impte venta :$");

        jLabel4.setText("Impte. Enganche:$");

        jLabel5.setText("Saldo Inicial:$");

        jLabel7.setText("Dirreccion:");

        jLabel8.setText("Colonia:");

        jLabel9.setText("Tel. Domicilio:");

        jLabel10.setText("celular:");

        jLabel6.setText("Fecha:");

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jLabel9)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(jTextField9, javax.swing.GroupLayout.DEFAULT_SIZE, 96, Short.MAX_VALUE)))
                        .addGap(64, 64, 64)
                        .addComponent(jLabel2))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel7)
                            .addComponent(jLabel8))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, 122, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jLabel10)
                        .addGap(18, 18, 18)
                        .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, 146, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                            .addComponent(jLabel5)
                            .addGap(36, 36, 36)
                            .addComponent(jTextField5, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))
                        .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel1Layout.createSequentialGroup()
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jLabel4)
                                .addComponent(jLabel3))
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(jTextField4, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(86, 86, 86)
                        .addComponent(jLabel6)
                        .addGap(18, 18, 18)
                        .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, 52, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addGap(58, 58, 58))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(jLabel1)
                                    .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel7)
                                            .addComponent(jTextField7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(18, 18, 18)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel8)
                                            .addComponent(jTextField8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                    .addGroup(jPanel1Layout.createSequentialGroup()
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel3)
                                            .addComponent(jTextField3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(10, 10, 10)
                                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jLabel4)
                                            .addComponent(jTextField4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(11, 11, 11))))
                            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(jLabel2)
                                .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jLabel6)
                            .addComponent(jTextField6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel5)
                    .addComponent(jTextField5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(jLabel9)
                        .addComponent(jLabel10)
                        .addComponent(jTextField9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jTextField10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {new Integer(1), null, null, null, null},
                {new Integer(2), null, null, null, null},
                {new Integer(3), null, null, null, null},
                {new Integer(4), null, null, null, null},
                {new Integer(4), null, null, null, null},
                {new Integer(6), null, null, null, null},
                {new Integer(7), null, null, null, null},
                {new Integer(8), null, null, null, null},
                {new Integer(9), null, null, null, null},
                {new Integer(10), null, null, null, null},
                {new Integer(11), null, null, null, null},
                {new Integer(12), null, null, null, null}
            },
            new String [] {
                "No. Pagos", "Fecha VCTO", "Fecha de Pago:", "Importe:", "Cobrador"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.Integer.class, java.lang.Object.class, java.lang.Object.class, java.lang.Double.class, java.lang.Integer.class
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }
        });
        jScrollPane1.setViewportView(jTable1);

        jLabel11.setText("Saldo Actual:");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGap(20, 20, 20)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(10, 10, 10)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 561, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(63, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(366, Short.MAX_VALUE)
                .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, 108, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(128, 128, 128))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 229, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel11)
                    .addComponent(jTextField11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>


    // Variables declaration - do not modify
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JTable jTable1;
    private javax.swing.JTextField jTextField1;
    private javax.swing.JTextField jTextField10;
    private javax.swing.JTextField jTextField11;
    private javax.swing.JTextField jTextField2;
    private javax.swing.JTextField jTextField3;
    private javax.swing.JTextField jTextField4;
    private javax.swing.JTextField jTextField5;
    private javax.swing.JTextField jTextField6;
    private javax.swing.JTextField jTextField7;
    private javax.swing.JTextField jTextField8;
    private javax.swing.JTextField jTextField9;
    // End of variables declaration

}


ahora mi pregunta es como la puedo genrar automaticamente si hacerlo con un for como algo como estoo....
 y en vez de el value ponerle setvalue...alguien me puede ayudar siii? :( :( te antemano muchas gracias
Código:
   double total=0;
for (int fila=0; fila < dtm.getRowCount(); fila++) {
   total =  (double) (double) (total + (Double) dtm.getValueAt(fila, 2)); // la columna 2 es la de costo.
   this.montocompra.setText(Double.toString(total));
}


9  Programación / Java / diferentes maneras de generar un reporte en java? en: 13 Mayo 2011, 18:30 pm
bueno esto esta algo enredado,lo que quiero hacer es generar un reporte de una consulta en java,pára eso ocupo ireport y librerias jasper report...ahora aqui viene mi problema...yo creo el reporte en ireport lo diseño..lo pongoe n una ubicacion y lo mando a llamar el jrxml,me lo compila y me lo manda en pantalla.....pero estaba pensando..si alguien de ustedes me podria decir la manera en que se puede ser automaticamente...

Oseaa tomar la tabla que esta activa con los registros y mandar el reporte asi automatico como hacen los sistemas de oxxo del walrtmart etc...

bueno con este codigo automaticamente me manda a imprimir......esto seria una
Código
  1. private void btnImprimirActionPerformed(java.awt.event.ActionEvent evt) {                                            
  2.         try {
  3.            //Mensaje de encabezado
  4.            MessageFormat headerFormat = new MessageFormat("Tutorial Imprimir JTables");
  5.            //Mensaje en el pie de pagina
  6.            MessageFormat footerFormat = new MessageFormat("ContreSpace");
  7.            //Imprimir JTable
  8.            tabla.print(JTable.PrintMode.NORMAL, headerFormat, footerFormat);
  9.        } catch (PrinterException ex) {
  10.            Logger.getLogger(frmImprimir_JTable.class.getName()).log(Level.SEVERE, null, ex);
  11.        }
  12.    }                                        
  13.  
  14.  
  15.  

ahoraa me pregunto si tal si le paso un query y de ese query me genera el reporte,perooo el reporte lo tengo que diseñar...con ireport...sigo buscando de como hacer esto pasando un query y que de ahi me genere el reporte..algo como esto
Código
  1. package imprimir_jtable;
  2.  
  3. import net.sf.jasperreports.engine.*;
  4. import net.sf.jasperreports.engine.export.*;
  5. import net.sf.jasperreports.engine.util.*;
  6. import net.sf.jasperreports.view.*;
  7. import java.sql.*;
  8.  
  9. import java.io.*;
  10. import java.util.*;
  11.  
  12. public class Main {
  13.  
  14.    public Main() {
  15.    }
  16.  
  17.    public static void main(String[] args) {
  18.        // TODO code application logic here
  19.  
  20.    try
  21.    {
  22.  
  23.        //Ruta de Archivo Jasper
  24.        String fileName="C:\\Users\\Hacker\\Desktop\\rep_cli.jasper";
  25.        //Ruta de archivo pdf de destino
  26.        String destFileNamePdf="C:\\Users\\Hacker\\Desktop\\rep_cli.pdf";
  27.        //Ruta de archivo xls de destino
  28.        String destFileNameXls="C:\\Users\\Hacker\\Desktop\\rep_cli.xls";
  29.  
  30.        //Pasamos parametros al reporte Jasper.
  31.        Map parameters = new HashMap();
  32.            Object put = parameters.put("sql_query",new String("select * from categorias"));
  33.  
  34.  
  35.        //Preparacion del reporte (en esta etapa se inserta el valor del query en el reporte).
  36.        JasperPrint jasperPrint=JasperFillManager.fillReport(fileName, (Map) put,getConnection());
  37.  
  38.        //Creación del PDF
  39.        JasperExportManager.exportReportToPdfFile(jasperPrint,destFileNamePdf);
  40.  
  41.        //Creación del XLS
  42.        JRXlsExporter exporter = new JRXlsExporter();
  43.        exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
  44.        exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFileNameXls);
  45.        exporter.setParameter(JRXlsExporterParameter.IS_ONE_PAGE_PER_SHEET, Boolean.TRUE);
  46.        exporter.exportReport();
  47.  
  48.        System.exit(0);
  49.     }
  50.     catch (Exception e)
  51.     {
  52.            System.out.println(e.getMessage());
  53.     }
  54.    }
  55.  
  56.    /**Metodo para crear la conexion a DB*/
  57.    private static Connection getConnection() throws ClassNotFoundException, SQLException {
  58.        //Configuración de la conexión.
  59.        String driver = "com.mysql.jdbc.Driver";
  60.        String connectString = "jdbc:mysql://127.0.0.1:3306/almacen";
  61.        String user = "root";
  62.        String password = "12345";
  63.  
  64.        Class.forName(driver);
  65.        Connection conn = DriverManager.getConnection(connectString, user, password);
  66.  
  67.        //Retornamos la conexión establecida.
  68.    return conn;
  69. }
  70.  
  71. }
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  


esta otra manera encontre donde se le pasan las columnas y las filas pero ahi ya estan declaradas como seria para pasarle un query me lo genere de ese resultado....aqui ocupan la libreria  libreria itext
Código
  1.  
  2.  
  3. package imprimir_jtable;
  4.  
  5. import java.awt.BorderLayout;
  6.  
  7. import java.awt.Graphics2D;
  8.  
  9. import java.awt.Shape;
  10.  
  11. import java.awt.event.ActionEvent;
  12.  
  13. import java.awt.event.ActionListener;
  14.  
  15. import java.awt.event.WindowAdapter;
  16.  
  17. import java.awt.event.WindowEvent;
  18.  
  19. import java.io.FileOutputStream;
  20.  
  21. import java.io.IOException;
  22.  
  23. import javax.swing.JButton;
  24.  
  25. import javax.swing.JFrame;
  26.  
  27. import javax.swing.JPanel;
  28.  
  29. import javax.swing.JTable;
  30.  
  31. import javax.swing.JToolBar;
  32.  
  33. import com.lowagie.text.Document;
  34.  
  35. import com.lowagie.text.DocumentException;
  36.  
  37. import com.lowagie.text.PageSize;
  38.  
  39. import com.lowagie.text.pdf.PdfContentByte;
  40.  
  41. import com.lowagie.text.pdf.PdfWriter;
  42.  
  43.  
  44. public class JTable2Pdf extends JFrame {
  45.  
  46.  
  47. private JTable table;
  48.  
  49.  
  50. public JTable2Pdf() {
  51.  
  52. getContentPane().setLayout(new BorderLayout());
  53.  
  54. setTitle("JTable test");
  55.  
  56. createToolbar();
  57.  
  58. createTable();
  59.  
  60. addWindowListener(new WindowAdapter() {
  61.  
  62. public void windowClosing(WindowEvent e)
  63.  
  64. {System.exit(0);}
  65.  
  66. });
  67.  
  68. }
  69.  
  70.  
  71.  
  72. private void createTable() {
  73.  
  74. Object[][] data ={
  75.  
  76. {"Mary", "Campione", "Snowboarding", new
  77.  
  78. Integer(5), new Boolean(false)},
  79.  
  80. {"Alison", "Huml", "Rowing", new
  81.  
  82. Integer(3), new Boolean(true)},
  83.  
  84. {"Kathy", "Walrath", "Chasing toddlers",
  85.  
  86. new Integer(2), new Boolean(false)},
  87.  
  88. {"Mark", "Andrews", "Speed reading", new
  89.  
  90. Integer(20), new Boolean(true)},
  91.  
  92. {"Angela", "Lih", "Teaching high school", new Integer(4), new Boolean(false)}
  93.  
  94. };
  95.  
  96. String[] columnNames =
  97.  
  98. {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
  99.  
  100. table = new JTable(data, columnNames);
  101.  
  102. // Use a panel to contains the table and add it the frame
  103.  
  104. JPanel tPanel = new JPanel(new BorderLayout());
  105.  
  106. tPanel.add(table.getTableHeader(), BorderLayout.NORTH);
  107.  
  108. tPanel.add(table, BorderLayout.CENTER);
  109.  
  110. getContentPane().add(tPanel, BorderLayout.CENTER);
  111.  
  112. }
  113.  
  114.  
  115. private void createToolbar() {
  116.  
  117. JToolBar tb = new JToolBar();
  118.  
  119. JButton printBtn = new JButton("Print");
  120.  
  121. printBtn.addActionListener(new ActionListener() {
  122.  
  123. public void actionPerformed(ActionEvent e) {
  124.  
  125. print();
  126.  
  127. }
  128.  
  129. });
  130.  
  131. JButton exitBtn = new JButton("Exit");
  132.  
  133. exitBtn.addActionListener(new ActionListener() {
  134.  
  135. public void actionPerformed(ActionEvent e) {
  136.  
  137. exit();
  138.  
  139. }
  140.  
  141. });
  142.  
  143. tb.add(printBtn);
  144.  
  145. tb.add(exitBtn);
  146.  
  147. getContentPane().add(tb, BorderLayout.NORTH);
  148.  
  149. }
  150.  
  151. /////////ojoo aqui es para imprimir el pdf
  152. private void print() {
  153.  
  154. Document document = new Document(PageSize.A4.rotate());
  155.  
  156. try {
  157.  
  158. PdfWriter writer =
  159.  
  160. PdfWriter.getInstance(document, new FileOutputStream("C:\\Users\\Hacker\\Desktop\\myy_jtable_fonts.pdf"));
  161.  
  162. document.open();
  163.  
  164. PdfContentByte cb = writer.getDirectContent();
  165.  
  166. // Create the graphics as shapes
  167.  
  168. cb.saveState();
  169.  
  170. Graphics2D g2 = cb.createGraphicsShapes(500, 500);
  171.  
  172. // Print the table to the graphics
  173.  
  174. Shape oldClip = g2.getClip();
  175.  
  176. g2.clipRect(0, 0, 500, 500);
  177.  
  178. table.print(g2);
  179.  
  180. g2.setClip(oldClip);
  181.  
  182. g2.dispose();
  183.  
  184. cb.restoreState();
  185.  
  186. document.newPage();
  187.  
  188. // Create the graphics with pdf fonts
  189.  
  190. cb.saveState();
  191.  
  192. g2 = cb.createGraphics(500, 500);
  193.  
  194. // Print the table to the graphics
  195.  
  196. oldClip = g2.getClip();
  197.  
  198. g2.clipRect(0, 0, 500, 500);
  199.  
  200. table.print(g2);
  201.  
  202. g2.setClip(oldClip);
  203.  
  204. g2.dispose();
  205.  
  206. cb.restoreState();
  207.  
  208. } catch (Exception e) {
  209.  
  210. e.printStackTrace();
  211.  
  212. System.err.println(e.getMessage());
  213.  
  214. }
  215.  
  216. document.close();
  217.  
  218. }
  219.  
  220. /**
  221.  
  222. * Exit app
  223.  
  224. */
  225.  
  226. private void exit() {
  227.  
  228. System.exit(0);
  229.  
  230. }
  231.  
  232.  
  233. public static void main(String[] args) {
  234.  
  235. JTable2Pdf frame = new JTable2Pdf();
  236.  
  237. frame.pack();
  238.  
  239. frame.setVisible(true);
  240.  
  241. frame.print();
  242.  
  243. frame.exit();
  244.  
  245. }
  246.  
  247. }v
  248.  
  249.  

y esto me da como resultado esto...

no se si ustedes me podria ayudar o dar alguna sugerenciaa  de como han ustedes trabajado con esto y solucionado,si no es mucha molestiaa...de antemano muchas gracias saludos...maness.... seguire buscando en el sen sei google e ir implementando aver si me sale algo decente .. :-\ :-\
10  Programación / Java / Re: Validar usuario y contraseña en: 13 Mayo 2011, 17:46 pm
hola mennn..si no es muy tarde..te djo esto..se que te servira yo pase por eso tambien pidiendo ayuda y ahora me toca ayudar es un jframe cambia los valores por los tuyos..si tienes dudas preguntalas men saludos

Código
  1. package accesosimple;
  2.  
  3.  
  4.   import javax.swing.*;
  5.  
  6.   import javax.swing.*;
  7.   import javax.swing.*;
  8.   import java.io.*;
  9.   import java.sql.*;
  10.   import java.awt.Panel.*;
  11.   import java.awt.*;
  12.   import java.awt.event.*;
  13.  
  14.    public class ingreso extends javax.swing.JFrame {
  15.  
  16.  
  17.       public ingreso() {
  18.         super("INGRESO-VALIDACION DE USUARIO");
  19.         initComponents();
  20.         setTitle("Autentificacion de usuarios");
  21.         setSize(500,390);           // Tamanio del Frame
  22.         setResizable(false);       // que no se le pueda cambiar el tamanio
  23.        //Centrar la ventana de autentificacion en la pantalla
  24.         Dimension tamFrame=this.getSize();//para obtener las dimensiones del frame
  25.         Dimension tamPantalla=Toolkit.getDefaultToolkit().getScreenSize();      //para obtener el tamanio de la pantalla
  26.         setLocation((tamPantalla.width-tamFrame.width)/2, (tamPantalla.height-tamFrame.height)/2);  //para posicionar
  27.         setVisible(true);           // Hacer visible al frame
  28.      }
  29.  
  30.  
  31.       @SuppressWarnings("unchecked")
  32.    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  33.    private void initComponents() {
  34.  
  35.        jpnl_login = new javax.swing.JPanel();
  36.        btnlogin = new javax.swing.JButton();
  37.        btncancelar = new javax.swing.JButton();
  38.        lblusuario = new javax.swing.JLabel();
  39.        lblacceso = new javax.swing.JLabel();
  40.        lblpasswd = new javax.swing.JLabel();
  41.        txtPass = new javax.swing.JPasswordField();
  42.        txtUser = new javax.swing.JFormattedTextField();
  43.  
  44.        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  45.        setName("login"); // NOI18N
  46.  
  47.        jpnl_login.setBorder(javax.swing.BorderFactory.createTitledBorder("VALIDACION DE USUARIO"));
  48.  
  49.        btnlogin.setText("Login");
  50.        btnlogin.addActionListener(new java.awt.event.ActionListener() {
  51.            public void actionPerformed(java.awt.event.ActionEvent evt) {
  52.                btnloginActionPerformed(evt);
  53.            }
  54.        });
  55.  
  56.        btncancelar.setText("Cancelar");
  57.        btncancelar.addActionListener(new java.awt.event.ActionListener() {
  58.            public void actionPerformed(java.awt.event.ActionEvent evt) {
  59.                btncancelarActionPerformed(evt);
  60.            }
  61.        });
  62.  
  63.        lblusuario.setText("Usuario:");
  64.  
  65.        lblacceso.setFont(new java.awt.Font("Trebuchet MS", 1, 12));
  66.        lblacceso.setForeground(new java.awt.Color(255, 102, 102));
  67.        lblacceso.setText("ACCESO-VALIDACION DE USUARIO");
  68.  
  69.        lblpasswd.setText("Password:");
  70.  
  71.        txtUser.addActionListener(new java.awt.event.ActionListener() {
  72.            public void actionPerformed(java.awt.event.ActionEvent evt) {
  73.                txtUserActionPerformed(evt);
  74.            }
  75.        });
  76.  
  77.        javax.swing.GroupLayout jpnl_loginLayout = new javax.swing.GroupLayout(jpnl_login);
  78.        jpnl_login.setLayout(jpnl_loginLayout);
  79.        jpnl_loginLayout.setHorizontalGroup(
  80.            jpnl_loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  81.            .addGroup(jpnl_loginLayout.createSequentialGroup()
  82.                .addContainerGap()
  83.                .addComponent(btnlogin, javax.swing.GroupLayout.PREFERRED_SIZE, 74, javax.swing.GroupLayout.PREFERRED_SIZE)
  84.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 140, Short.MAX_VALUE)
  85.                .addComponent(btncancelar)
  86.                .addGap(89, 89, 89))
  87.            .addGroup(jpnl_loginLayout.createSequentialGroup()
  88.                .addGroup(jpnl_loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
  89.                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpnl_loginLayout.createSequentialGroup()
  90.                        .addComponent(lblusuario, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
  91.                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  92.                        .addComponent(txtUser))
  93.                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpnl_loginLayout.createSequentialGroup()
  94.                        .addComponent(lblpasswd, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
  95.                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  96.                        .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)))
  97.                .addGap(209, 209, 209))
  98.            .addGroup(jpnl_loginLayout.createSequentialGroup()
  99.                .addGap(47, 47, 47)
  100.                .addComponent(lblacceso, javax.swing.GroupLayout.PREFERRED_SIZE, 213, javax.swing.GroupLayout.PREFERRED_SIZE)
  101.                .addContainerGap(128, Short.MAX_VALUE))
  102.        );
  103.        jpnl_loginLayout.setVerticalGroup(
  104.            jpnl_loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  105.            .addGroup(jpnl_loginLayout.createSequentialGroup()
  106.                .addGap(16, 16, 16)
  107.                .addComponent(lblacceso)
  108.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
  109.                .addGroup(jpnl_loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  110.                    .addComponent(lblusuario, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
  111.                    .addGroup(jpnl_loginLayout.createSequentialGroup()
  112.                        .addGap(28, 28, 28)
  113.                        .addComponent(txtUser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
  114.                .addGap(36, 36, 36)
  115.                .addGroup(jpnl_loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  116.                    .addComponent(lblpasswd, javax.swing.GroupLayout.PREFERRED_SIZE, 22, javax.swing.GroupLayout.PREFERRED_SIZE)
  117.                    .addComponent(txtPass, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
  118.                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 80, Short.MAX_VALUE)
  119.                .addGroup(jpnl_loginLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
  120.                    .addComponent(btnlogin)
  121.                    .addComponent(btncancelar))
  122.                .addGap(25, 25, 25))
  123.        );
  124.  
  125.        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  126.        getContentPane().setLayout(layout);
  127.        layout.setHorizontalGroup(
  128.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  129.            .addGroup(layout.createSequentialGroup()
  130.                .addGap(37, 37, 37)
  131.                .addComponent(jpnl_login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  132.                .addContainerGap(24, Short.MAX_VALUE))
  133.        );
  134.        layout.setVerticalGroup(
  135.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  136.            .addGroup(layout.createSequentialGroup()
  137.                .addContainerGap()
  138.                .addComponent(jpnl_login, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  139.                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
  140.        );
  141.  
  142.        pack();
  143.    }// </editor-fold>                        
  144.  
  145.       private void txtUserActionPerformed(java.awt.event.ActionEvent evt) {                                        
  146.  
  147.      }                                      
  148.  
  149.       private void btnloginActionPerformed(java.awt.event.ActionEvent evt) {                                        
  150.  
  151.          ingreso ap=new ingreso();
  152.               ap.setVisible(false);
  153.  
  154.         try
  155.         {
  156.                    //chekar si el usuario escrbio el nombre de usuario y pw
  157.            if (txtUser.getText().length() > 0 && txtPass.getText().length() > 0 )
  158.            {
  159.                        // Si el usuario si fue validado correctamente
  160.               if( validarUsuario( txtUser.getText(), txtPass.getText() ) )    //enviar datos a validar
  161.               {
  162.  
  163.  
  164.  
  165.                  int answer= JOptionPane.showConfirmDialog(null,"BIENVENIDO DESEA CONTINUAR","ACCCESO",JOptionPane.YES_OPTION);
  166.  
  167.                  if (answer == JOptionPane.YES_OPTION)
  168.                  {
  169.                    setVisible(false);
  170.                    principal start = new principal();
  171.                           start.show();
  172.  
  173.  
  174.                  }
  175.  
  176.                 // Codigo para mostrar la ventana principal
  177.                  setVisible(false);
  178.                           //VentanaPrincipal ventana1 = new VentanaPrincipal();
  179.                           //ventana1.show();
  180.  
  181.               }
  182.               else
  183.               {
  184.                  JOptionPane.showMessageDialog(null, "El nombre de usuario y/o contrasenia no son validos.");
  185.                  JOptionPane.showMessageDialog(null, txtUser.getText()+" " +txtPass.getText() );
  186.                  txtUser.setText(""); //limpiar campos
  187.                  txtPass.setText("");
  188.  
  189.                  txtUser.requestFocusInWindow();
  190.               }
  191.  
  192.            }
  193.            else
  194.            {
  195.               JOptionPane.showMessageDialog(null, "Debe escribir nombre de usuario y contrasenia.\n" +
  196.                            "NO puede dejar ningun campo vacio");
  197.            }
  198.  
  199.         }
  200.             catch (Exception e)
  201.            {
  202.               e.printStackTrace();
  203.            }
  204.  
  205.  
  206.  
  207.  
  208.      }                                        
  209.  
  210.       private void btncancelarActionPerformed(java.awt.event.ActionEvent evt) {                                            
  211.         //
  212.         String message = "REALMENTE DESEA SALIR DEL SISTEMA";
  213.         String title = "Acceso Al Sistema";
  214.  
  215.         int answer = JOptionPane.showConfirmDialog(null, message, title, JOptionPane.YES_NO_CANCEL_OPTION);
  216.  
  217.         if (answer == JOptionPane.YES_OPTION)
  218.         {
  219.  
  220.            System.exit(0); // clicked yes
  221.         }
  222.         else if (answer == JOptionPane.NO_OPTION)
  223.         {
  224.         // clicked no
  225.         }
  226.  
  227.      }                                          
  228.  
  229.  public  boolean validarUsuario(String elUsr, String elPw)  throws IOException
  230.      {
  231.         try
  232.         {
  233.         //nombre de la BD: bdlogin
  234.             //nombre de la tabla: usuarios
  235.             // id integer auto_increment not null     <--llave primaria
  236.             //                   campos:    usuario char(25)
  237.             //                              password char(50)
  238.  
  239.  
  240.            Class.forName("com.mysql.jdbc.Driver");
  241.            Connection unaConexion  = DriverManager.getConnection ("jdbc:mysql://localhost/almacen","root", "12345");
  242.            // Preparamos la consulta
  243.            Statement instruccionSQL = unaConexion.createStatement();
  244.            ResultSet resultadosConsulta = instruccionSQL.executeQuery ("SELECT * FROM usuario WHERE nombre='"+elUsr+"' AND password='"+ elPw+"'");
  245.  
  246.            if( resultadosConsulta.first() )        // si es valido el primer reg. hay una fila, tons el usuario y su pw existen
  247.               return true;        //usuario validado correctamente
  248.            else
  249.               return false;        //usuario validado incorrectamente
  250.  
  251.         }
  252.             catch (Exception e)
  253.            {
  254.               e.printStackTrace();
  255.               return false;
  256.            }
  257.  
  258.      }
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.       public static void main(String args[]) {
  266.         java.awt.EventQueue.invokeLater(
  267.                new Runnable() {
  268.                   public void run() {
  269.                     new ingreso().setVisible(true);
  270.  
  271.  
  272.  
  273.                  }
  274.               });
  275.      }
  276.  
  277.    // Variables declaration - do not modify                    
  278.    private javax.swing.JButton btncancelar;
  279.    private javax.swing.JButton btnlogin;
  280.    private javax.swing.JPanel jpnl_login;
  281.    private javax.swing.JLabel lblacceso;
  282.    private javax.swing.JLabel lblpasswd;
  283.    private javax.swing.JLabel lblusuario;
  284.    private javax.swing.JPasswordField txtPass;
  285.    private javax.swing.JFormattedTextField txtUser;
  286.    // End of variables declaration                  
  287.  
  288.   }
  289.  
  290.  
  291.  

Páginas: [1] 2 3 4 5 6
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines