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

 

 


Tema destacado: Los 10 CVE más críticos (peligrosos) de 2020


  Mostrar Temas
Páginas: 1 [2] 3 4 5
11  Programación / Java / probleas con login y splash en: 3 Septiembre 2015, 09:56 am
Hola buenas noches

me podrían ayudar tengo problemas con mi login y splash screen, este ultimo ejecuta y me lleva al programa principal pero si no ingreso la contraseña y usuario no me deja utilizar las funciones del programa aquí les dejo el código:

Código:

package ventanas;

import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Graphics;
import javax.swing.ImageIcon;

/**
 *
 * @author anthony
 */
public class splash extends javax.swing.JPanel {
    ImageIcon imagen; // imagen para mostrar
    BorderLayout esquema;
    /**
     * Creates new form splash
     */
    public splash() {
        initComponents();
        estados.setForeground(Color.red);       
        imagen = new ImageIcon(getClass().getResource("/resources/imagenes/sapam1.png")); // se obtiene la imagen
        this.setSize(imagen.getIconWidth(), imagen.getIconHeight()); // se establece el tamaño del panel
        // mediante la dimencion de la imagen ancho y alto
    }
   
    @Override
    public void paintComponent(Graphics g){ // metodo paintComponent para dibujar la imagen
        super.paintComponent(g); // para que el panel se despligue sin errores
        g.drawImage(imagen.getImage(), 0, 0, imagen.getIconWidth(), imagen.getIconHeight(), this); // se dibuja la imagen
        this.setOpaque(false); // se establece el panel transparente para que se pueda ver la imagen
    }

    public void velocidadDeCarga() throws InterruptedException{ // motodo para controlar la barra
        for(int i = 0; i<=100; i++){ // establece el recorrido de la barra de progreso
            Thread.sleep(45); // pausas para dar el efecto de carga
            progreso.setForeground(Color.GREEN); // color de la barra de progreso
            progreso.setValue(i); // se asigna el valor de la barra
            if (i == 35) {
               estados.setText("jcalendar - 1.4.jar");
            }
            if (i == 55) {
                estados.setText("jxl.jar");
            }
           
            if (i == 70) {
                estados.setText("JDK 1.7");
            }
           
            if (i == 95) {
                estados.setText("Finalizando Carga....");
            }
           
        }
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                         
    private void initComponents() {

        progreso = new javax.swing.JProgressBar();
        estados = new javax.swing.JLabel();

        progreso.setPreferredSize(new java.awt.Dimension(146, 14));
        progreso.setStringPainted(true);

        estados.setText("Cargando modulos");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        this.setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(estados)
                .addContainerGap(356, Short.MAX_VALUE))
            .addComponent(progreso, javax.swing.GroupLayout.DEFAULT_SIZE, 455, Short.MAX_VALUE)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(264, Short.MAX_VALUE)
                .addComponent(estados)
                .addGap(36, 36, 36)
                .addComponent(progreso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );
    }// </editor-fold>                       
    // Variables declaration - do not modify                     
    private javax.swing.JLabel estados;
    private javax.swing.JProgressBar progreso;
    // End of variables declaration                   
}




Código:

package ventanas;

import java.awt.BorderLayout;
import javax.swing.JWindow;
import javax.swing.UIManager;

public class RunSplash extends JWindow{

    splash p; // clase Panel, la que nos creamos
     //para cargar la otra ventana
    /** Creates new form RunSplash 
     * @throws InterruptedException */
    public RunSplash() throws InterruptedException{ // constructor
        p = new splash(); // se crea el objeto Panel
        MainApp ventana = new MainApp();//creamos la ventana       
        ventana.setLocationRelativeTo(null);
        this.add(p, BorderLayout.CENTER); // se añade el panel en el centro
        this.setSize(p.getWidth(), p.getHeight());// se establece el tamaño del RunSplash
        // ahora y lo mas importante se quita toda()+75 la decoracion de la ventana 
        //marco, botones minimizar, cerrar con el metodo setUndecorated(true)
        //para dar el efecto de que solo se muestra la imagen con la barra...
        this.setLocationRelativeTo(null);// se muestra el splash en el centro
        setVisible(true); // se visualiza el Splash Screen
        p.velocidadDeCarga();//se invoca al metodo velocidadDeCarga de la clase Panel
        //para establecer el recorrido de la barra
        this.dispose();// se cierra el Splash cuando termina el recorrido de la barra
        ventana.setVisible(true);
        /**********************
         * Aqui pueden llamar a la ventana pricipal de sus aplicaciones
         * y asi esto dará presencia a sus aplicaciones
         */
    }
     
    public static void main(String args[]) throws InterruptedException {
        new RunSplash(); // se invoca a la ventana RunSplash         
    }

12  Programación / Java / despues de crear un EXE apartir de un JAR en: 31 Agosto 2015, 00:12 am
Hola buenas tardes solicitando de su ayuda hice un proyecto en netbeans, realice un archivo jar en donde exporta los datos de una tabla a excel al correr el programa desde netbeans no hay ningún problema guarda correctamente los datos en excel después de crear el archivo jar al ejecutarlo desde la pc en la ubicación dist tampoco existe problema, es después de crear un exe a partir de mi compilación JAR el programa corre perfectamente pero cuando deseo importar mi archivo en formato excel no genera el archivo xls no estoy utilizando ninguna base de datos.. cual es el problema ya investigue por todos lados pero no encuentro la solución..por su ayuda y tiempo les agradezco..

saludos!!
13  Programación / PHP / error:function.session-destroy en: 3 Mayo 2014, 07:34 am
Buenas noches me podrían ayudar porque me sale este error también les dejo el código... gracias

Warning: session_destroy() [function.session-destroy]: Trying to destroy uninitialized session in C:\AppServ\www\inventario\Inventario\conexion\login.php on line 34

Warning: Cannot modify header information - headers already sent by (output started at C:\AppServ\www\inventario\Inventario\conexion\login.php:34) in C:\AppServ\www\inventario\Inventario\conexion\login.php on line 35



Código
  1. <?php
  2.  
  3. $user=$_REQUEST["username"];
  4. $pass=$_REQUEST["pass"];
  5. //conexión a la base de datos.
  6. $con=mysql_connect("localhost", "root", "1234");
  7. $query="SELECT * FROM inventariodb.users
  8.        WHERE username='".$user."';";
  9. $x=mysql_query($query);
  10. @$user1=mysql_result($x, 0, 'username');
  11. @$pass1=mysql_result($x, 0, 'pass');
  12. @$rol=mysql_result($x,0,'rol');
  13. if($user==$user1 && $pass==$pass1 && $user!="" && $rol=="admin"){
  14.    session_start();
  15.    $_SESSION["ok"]=true;
  16.    $_SESSION["user"]=$user;
  17. $_SESSION["admin"]=true;
  18.  
  19.  
  20.    header("Location:http://localhost/Inventario/paginas/admin/index admin.php");
  21. }elseif($user==$user1 && $pass==$pass1 && $user!="" && $rol=="user"){
  22. $_SESSION["ok"]=true;
  23.    $_SESSION["user"]=$user;
  24.  
  25.  
  26.  
  27. header("Location:http://localhost/Inventario/paginas/index.php");
  28. }else{
  29.    header("Location:http://localhost/Inventario/paginas/Iniciar Sesion.php");
  30.    exit;
  31. }
  32. ?>
  33.  
14  Programación / PHP / error al crear tablas en: 1 Mayo 2014, 07:42 am
Hola buenas noches tengo el siguiente problema al crear mis tablas en phpmyadmmin espero que me puedan ayudar... gracias
Código
  1. CREATE TABLE `abonos` (
  2.  
  3. `mov_id` int( 10 ) NOT NULL AUTO_INCREMENT ,
  4. `abono_modelo` varchar( 30 ) NOT NULL ,
  5. `abono_valor` varchar( 30 ) NOT NULL ,
  6. `abono_serial` varchar( 30 ) NOT NULL ,
  7. `abono_fecha` datetime NOT NULL ,
  8. `abono_cliente` varchar( 40 ) NOT NULL ,
  9. PRIMARY KEY ( `mov_id` )
  10. ) ENGINE = MYISAM AUTO_INCREMENT =7 DEFAULT CHARSET = utf8;
  11.  
  12.  
  13.  
  14. MySQL ha dicho: Documentación
  15. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'compu
  16.  
  17. CREATE TABLE `abonos` (
  18.   `mov_id` int(10) NOT NULL auto_increment' at line 1
  19.  
15  Programación / Java / PORQUE IMPRIME LAS GRAFICAS Y NO EL TEXTO en: 24 Abril 2014, 06:09 am
hola buenas noches solicitando nuevamente de su ayuda, en este código me estoy guiando para la impresión de unos datos pero al momento de llamar la impresión si ejecuta pero me imprime la ventana les adjunto el código del que me estoy guiando, me gustaría imprimir solo texto en la impresora: EL TEMA FUE REFORMULADO POR CUESTIONES DE REGLAS DEL FORO MIL DISCULPAS...
GRACIAS!!!!
Código
  1. import java.awt.Graphics;
  2. import java.awt.Graphics2D;
  3. import java.awt.print.PageFormat;
  4. import java.awt.print.Printable;
  5. import java.awt.print.PrinterException;
  6. import java.awt.print.PrinterJob;
  7. import java.awt.Image;
  8. import java.awt.Toolkit;
  9. import javax.swing.JOptionPane;
  10. public class JDlgImprimeOrden extends javax.swing.JDialog implements Printable{
  11.  
  12.    public JDlgImprimeOrden(java.awt.Frame parent, boolean modal) {
  13.        super(parent, modal);
  14.        initComponents();
  15.        setLocationRelativeTo(null);
  16.        Image icon = Toolkit.getDefaultToolkit().getImage(getClass().getResource("/Imagenes/money.png")); setIconImage(icon);
  17.    }
  18.  
  19.    @Override
  20. public int print(Graphics graphics, PageFormat pageFormat, int pageIndex) throws PrinterException
  21. {
  22.    try
  23.    {
  24.    if (pageIndex > 0)
  25.    {
  26.      return NO_SUCH_PAGE;
  27.    }
  28.      Graphics2D g2d = (Graphics2D)graphics;
  29.      g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
  30.      this.printAll(graphics);
  31.      return PAGE_EXISTS;
  32.    }
  33.    catch(Exception ex)
  34.        {
  35.            JOptionPane.showMessageDialog( null, "NO HAY OBJETOS A IMPRIMIR", "ERROR DE IMPRESION", JOptionPane.ERROR_MESSAGE);
  36.        }
  37.    return PAGE_EXISTS;
  38. }
  39.    @SuppressWarnings("unchecked")
  40.    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
  41.    private void initComponents() {
  42.  
  43.        jLabel1 = new javax.swing.JLabel();
  44.        jLabel2 = new javax.swing.JLabel();
  45.        jLabel3 = new javax.swing.JLabel();
  46.        jLabel4 = new javax.swing.JLabel();
  47.        jLabel5 = new javax.swing.JLabel();
  48.        jLabel6 = new javax.swing.JLabel();
  49.        NoCuenta = new javax.swing.JLabel();
  50.        jLabel8 = new javax.swing.JLabel();
  51.        Nombre = new javax.swing.JLabel();
  52.        jLabel9 = new javax.swing.JLabel();
  53.        Direccion = new javax.swing.JLabel();
  54.        jLabel10 = new javax.swing.JLabel();
  55.        Colonia = new javax.swing.JLabel();
  56.        jLabel11 = new javax.swing.JLabel();
  57.        Municipio = new javax.swing.JLabel();
  58.        jLabel12 = new javax.swing.JLabel();
  59.        Telefono = new javax.swing.JLabel();
  60.        jLabel13 = new javax.swing.JLabel();
  61.        Rfc = new javax.swing.JLabel();
  62.        jLabel15 = new javax.swing.JLabel();
  63.        Inspector = new javax.swing.JLabel();
  64.        jLabel16 = new javax.swing.JLabel();
  65.        Tipo = new javax.swing.JLabel();
  66.        jLabel17 = new javax.swing.JLabel();
  67.        jScrollPane1 = new javax.swing.JScrollPane();
  68.        jTextArea1 = new javax.swing.JTextArea();
  69.        JBtnImprimir = new javax.swing.JButton();
  70.        Folio = new javax.swing.JLabel();
  71.  
  72.        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
  73.        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sispag.PryKualiAtlApp.class).getContext().getResourceMap(JDlgImprimeOrden.class);
  74.        setTitle(resourceMap.getString("Form.title")); // NOI18N
  75.        setName("Form"); // NOI18N
  76.        setResizable(false);
  77.  
  78.        jLabel1.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  79.        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
  80.        jLabel1.setName("jLabel1"); // NOI18N
  81.  
  82.        jLabel2.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  83.        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
  84.        jLabel2.setName("jLabel2"); // NOI18N
  85.  
  86.        jLabel3.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  87.        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
  88.        jLabel3.setName("jLabel3"); // NOI18N
  89.  
  90.        jLabel4.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  91.        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
  92.        jLabel4.setName("jLabel4"); // NOI18N
  93.  
  94.        jLabel5.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  95.        jLabel5.setName("jLabel5"); // NOI18N
  96.  
  97.        jLabel6.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  98.        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
  99.        jLabel6.setName("jLabel6"); // NOI18N
  100.  
  101.        NoCuenta.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  102.        NoCuenta.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  103.        NoCuenta.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  104.        NoCuenta.setName("NoCuenta"); // NOI18N
  105.  
  106.        jLabel8.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  107.        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
  108.        jLabel8.setName("jLabel8"); // NOI18N
  109.  
  110.        Nombre.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  111.        Nombre.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  112.        Nombre.setName("Nombre"); // NOI18N
  113.  
  114.        jLabel9.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  115.        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
  116.        jLabel9.setName("jLabel9"); // NOI18N
  117.  
  118.        Direccion.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  119.        Direccion.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  120.        Direccion.setName("Direccion"); // NOI18N
  121.  
  122.        jLabel10.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  123.        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
  124.        jLabel10.setName("jLabel10"); // NOI18N
  125.  
  126.        Colonia.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  127.        Colonia.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  128.        Colonia.setName("Colonia"); // NOI18N
  129.  
  130.        jLabel11.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  131.        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
  132.        jLabel11.setName("jLabel11"); // NOI18N
  133.  
  134.        Municipio.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  135.        Municipio.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  136.        Municipio.setName("Municipio"); // NOI18N
  137.  
  138.        jLabel12.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  139.        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
  140.        jLabel12.setName("jLabel12"); // NOI18N
  141.  
  142.        Telefono.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  143.        Telefono.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  144.        Telefono.setName("Telefono"); // NOI18N
  145.  
  146.        jLabel13.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  147.        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
  148.        jLabel13.setName("jLabel13"); // NOI18N
  149.  
  150.        Rfc.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  151.        Rfc.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
  152.        Rfc.setName("Rfc"); // NOI18N
  153.  
  154.        jLabel15.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  155.        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
  156.        jLabel15.setName("jLabel15"); // NOI18N
  157.  
  158.        Inspector.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  159.        Inspector.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  160.        Inspector.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  161.        Inspector.setName("Inspector"); // NOI18N
  162.  
  163.        jLabel16.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  164.        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
  165.        jLabel16.setName("jLabel16"); // NOI18N
  166.  
  167.        Tipo.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  168.        Tipo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  169.        Tipo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  170.        Tipo.setName("Tipo"); // NOI18N
  171.  
  172.        jLabel17.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
  173.        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
  174.        jLabel17.setName("jLabel17"); // NOI18N
  175.  
  176.        jScrollPane1.setName("jScrollPane1"); // NOI18N
  177.  
  178.        jTextArea1.setColumns(20);
  179.        jTextArea1.setRows(5);
  180.        jTextArea1.setName("jTextArea1"); // NOI18N
  181.        jScrollPane1.setViewportView(jTextArea1);
  182.  
  183.        JBtnImprimir.setFont(resourceMap.getFont("JBtnImprimir.font")); // NOI18N
  184.        JBtnImprimir.setIcon(resourceMap.getIcon("JBtnImprimir.icon")); // NOI18N
  185.        JBtnImprimir.setText(resourceMap.getString("JBtnImprimir.text")); // NOI18N
  186.        JBtnImprimir.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
  187.        JBtnImprimir.setName("JBtnImprimir"); // NOI18N
  188.        JBtnImprimir.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
  189.        JBtnImprimir.addActionListener(new java.awt.event.ActionListener() {
  190.            public void actionPerformed(java.awt.event.ActionEvent evt) {
  191.                JBtnImprimirActionPerformed(evt);
  192.            }
  193.        });
  194.  
  195.        Folio.setFont(resourceMap.getFont("Rfc.font")); // NOI18N
  196.        Folio.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
  197.        Folio.setName("Folio"); // NOI18N
  198.  
  199.        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
  200.        getContentPane().setLayout(layout);
  201.        layout.setHorizontalGroup(
  202.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  203.            .addGroup(layout.createSequentialGroup()
  204.                .addGap(10, 10, 10)
  205.                .addComponent(jLabel1))
  206.            .addGroup(layout.createSequentialGroup()
  207.                .addGap(115, 115, 115)
  208.                .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE))
  209.            .addGroup(layout.createSequentialGroup()
  210.                .addGap(152, 152, 152)
  211.                .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE))
  212.            .addGroup(layout.createSequentialGroup()
  213.                .addGap(10, 10, 10)
  214.                .addComponent(jLabel4)
  215.                .addGap(45, 45, 45)
  216.                .addComponent(Folio, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
  217.            .addGroup(layout.createSequentialGroup()
  218.                .addGap(10, 10, 10)
  219.                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE))
  220.            .addGroup(layout.createSequentialGroup()
  221.                .addGap(10, 10, 10)
  222.                .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE)
  223.                .addGap(6, 6, 6)
  224.                .addComponent(NoCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
  225.            .addGroup(layout.createSequentialGroup()
  226.                .addGap(10, 10, 10)
  227.                .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
  228.                .addGap(6, 6, 6)
  229.                .addComponent(Nombre, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE))
  230.            .addGroup(layout.createSequentialGroup()
  231.                .addGap(10, 10, 10)
  232.                .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
  233.                .addGap(6, 6, 6)
  234.                .addComponent(Direccion, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
  235.            .addGroup(layout.createSequentialGroup()
  236.                .addGap(10, 10, 10)
  237.                .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
  238.                .addGap(16, 16, 16)
  239.                .addComponent(Colonia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
  240.            .addGroup(layout.createSequentialGroup()
  241.                .addGap(10, 10, 10)
  242.                .addComponent(jLabel11)
  243.                .addGap(16, 16, 16)
  244.                .addComponent(Municipio, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE))
  245.            .addGroup(layout.createSequentialGroup()
  246.                .addGap(10, 10, 10)
  247.                .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
  248.                .addGap(6, 6, 6)
  249.                .addComponent(Telefono, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
  250.                .addGap(10, 10, 10)
  251.                .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
  252.                .addGap(6, 6, 6)
  253.                .addComponent(Rfc, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE))
  254.            .addGroup(layout.createSequentialGroup()
  255.                .addGap(10, 10, 10)
  256.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  257.                    .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
  258.                    .addGroup(layout.createSequentialGroup()
  259.                        .addGap(89, 89, 89)
  260.                        .addComponent(Inspector, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE))))
  261.            .addGroup(layout.createSequentialGroup()
  262.                .addGap(10, 10, 10)
  263.                .addComponent(jLabel16)
  264.                .addGap(16, 16, 16)
  265.                .addComponent(Tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE))
  266.            .addGroup(layout.createSequentialGroup()
  267.                .addGap(10, 10, 10)
  268.                .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
  269.            .addGroup(layout.createSequentialGroup()
  270.                .addGap(10, 10, 10)
  271.                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE))
  272.            .addGroup(layout.createSequentialGroup()
  273.                .addGap(140, 140, 140)
  274.                .addComponent(JBtnImprimir))
  275.        );
  276.        layout.setVerticalGroup(
  277.            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  278.            .addGroup(layout.createSequentialGroup()
  279.                .addGap(11, 11, 11)
  280.                .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE)
  281.                .addGap(6, 6, 6)
  282.                .addComponent(jLabel2)
  283.                .addGap(6, 6, 6)
  284.                .addComponent(jLabel3)
  285.                .addGap(6, 6, 6)
  286.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  287.                    .addGroup(layout.createSequentialGroup()
  288.                        .addGap(2, 2, 2)
  289.                        .addComponent(jLabel4))
  290.                    .addComponent(Folio, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE))
  291.                .addGap(6, 6, 6)
  292.                .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE)
  293.                .addGap(6, 6, 6)
  294.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  295.                    .addComponent(jLabel6)
  296.                    .addComponent(NoCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
  297.                .addGap(11, 11, 11)
  298.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  299.                    .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
  300.                    .addComponent(Nombre, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
  301.                .addGap(11, 11, 11)
  302.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  303.                    .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
  304.                    .addComponent(Direccion, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
  305.                .addGap(11, 11, 11)
  306.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  307.                    .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
  308.                    .addComponent(Colonia, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
  309.                .addGap(11, 11, 11)
  310.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  311.                    .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)
  312.                    .addComponent(Municipio, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
  313.                .addGap(11, 11, 11)
  314.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  315.                    .addComponent(jLabel12)
  316.                    .addComponent(Telefono, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
  317.                    .addComponent(jLabel13)
  318.                    .addComponent(Rfc, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
  319.                .addGap(40, 40, 40)
  320.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  321.                    .addComponent(jLabel15)
  322.                    .addComponent(Inspector, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
  323.                .addGap(6, 6, 6)
  324.                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
  325.                    .addComponent(jLabel16)
  326.                    .addComponent(Tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE))
  327.                .addGap(11, 11, 11)
  328.                .addComponent(jLabel17)
  329.                .addGap(11, 11, 11)
  330.                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
  331.                .addGap(11, 11, 11)
  332.                .addComponent(JBtnImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE))
  333.        );
  334.  
  335.        pack();
  336.    }// </editor-fold>                        
  337.  
  338.    private void JBtnImprimirActionPerformed(java.awt.event.ActionEvent evt) {                                            
  339.  
  340.        try{
  341.    try
  342.    {
  343.      PrinterJob job = PrinterJob.getPrinterJob();
  344.      job.setPrintable(this);
  345.      job.printDialog();
  346.      {
  347.         }
  348.      job.print();
  349.    }
  350.    catch (PrinterException ex){  
  351.        {
  352.  
  353. }
  354.        JOptionPane.showMessageDialog( null, "NO EXISTEN IMPRESORAS INSTALADAS", "ERROR DE IMPRESION", JOptionPane.ERROR_MESSAGE);
  355.    }
  356. }
  357. catch(Exception ex)
  358.        {
  359.            JOptionPane.showMessageDialog( null, "NO EXISTEN IMPRESORAS INSTALADAS", "ERROR DE IMPRESION", JOptionPane.ERROR_MESSAGE);
  360.        }
  361.    }                                            
  362.  
  363.    public void mostrar(String folio,String cuentaa,String nombre,String dir,String colonia,String municipio,String tel,String rfc,String inspector,String tipo,String motivo)
  364.    {
  365.        this.Folio.setText(folio);
  366.        this.NoCuenta.setText(cuentaa);
  367.     //   this.NoCliente.setText(clavecli);
  368.        this.Nombre.setText(nombre);
  369.        this.Direccion.setText(dir);
  370.        this.Colonia.setText(colonia);
  371.        this.Municipio.setText(municipio);
  372.        this.Telefono.setText(tel);
  373.        this.Rfc.setText(rfc);
  374.        this.Inspector.setText(inspector);
  375.        this.Tipo.setText(tipo);
  376.        this.jTextArea1.setText(motivo);
  377.    }
  378.  
  379.    public static void main(String args[]) {
  380.        java.awt.EventQueue.invokeLater(new Runnable() {
  381.            public void run() {
  382.                JDlgImprimeOrden dialog = new JDlgImprimeOrden(new javax.swing.JFrame(), true);
  383.                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
  384.                    public void windowClosing(java.awt.event.WindowEvent e) {
  385.                        System.exit(0);
  386.                    }
  387.                });
  388.                dialog.setVisible(true);
  389.            }
  390.        });
  391.    }
  392.  
  393.    // Variables declaration - do not modify                    
  394.    private javax.swing.JLabel Colonia;
  395.    private javax.swing.JLabel Direccion;
  396.    private javax.swing.JLabel Folio;
  397.    private javax.swing.JLabel Inspector;
  398.    private javax.swing.JButton JBtnImprimir;
  399.    private javax.swing.JLabel Municipio;
  400.    private javax.swing.JLabel NoCuenta;
  401.    private javax.swing.JLabel Nombre;
  402.    private javax.swing.JLabel Rfc;
  403.    private javax.swing.JLabel Telefono;
  404.    private javax.swing.JLabel Tipo;
  405.    private javax.swing.JLabel jLabel1;
  406.    private javax.swing.JLabel jLabel10;
  407.    private javax.swing.JLabel jLabel11;
  408.    private javax.swing.JLabel jLabel12;
  409.    private javax.swing.JLabel jLabel13;
  410.    private javax.swing.JLabel jLabel15;
  411.    private javax.swing.JLabel jLabel16;
  412.    private javax.swing.JLabel jLabel17;
  413.    private javax.swing.JLabel jLabel2;
  414.    private javax.swing.JLabel jLabel3;
  415.    private javax.swing.JLabel jLabel4;
  416.    private javax.swing.JLabel jLabel5;
  417.    private javax.swing.JLabel jLabel6;
  418.    private javax.swing.JLabel jLabel8;
  419.    private javax.swing.JLabel jLabel9;
  420.    private javax.swing.JScrollPane jScrollPane1;
  421.    private javax.swing.JTextArea jTextArea1;
  422.    // End of variables declaration                  
  423. }
16  Programación / PHP / error en php en: 23 Abril 2014, 08:22 am
buen día solicitando de su ayuda porque me sale este error y cual podría ser la solución en phpmyadmin:

#2005 - Unknown MySQL server host 'localhost' (11001)
17  Programación / Java / compilar aplicacion en: 7 Abril 2014, 03:32 am
Buen día

solicitando nuevamente de su apoyo estoy en la parte final de mi proyecto ya he buscado información acerca de como ejecutar mi programa hecho en java sin tener que abrir netbeans, veo que una de las opciones es crear un archivo ejecutable JAR ya lo tengo y funciona bien ahora lo que intente hacer es que mi aplicación se ejecute en otra pc me comentan que con un compilador que empaquete el jdk y a su vez empaquete mi aplicación pero mi aplicación esta conectado a una base de datos mysql me puede ayudar con algún tutorial que me pueda ayudar....gracias
18  Programación / Java / calculadora en ubuntu y windows netbeans en: 30 Marzo 2014, 06:32 am
hola buen día

estoy con una aplicación en donde sea compatible con windows y ubuntu y que ejecute la aplicación calculadora si esta en ubuntu que ejecute su calculadora y que haga lo mismo en windows aquí les dejo el código pero me sale un error cuando lo ejecuto en las plataformas(windows o ubuntu) ayuda... gracias

}

private void JMItCalculadoraActionPerformed(java.awt.event.ActionEvent evt) {
try
{
Runtime obj = Runtime.getRuntime();
obj.exec("/usr/bin/gnome-calculator");
obj.exec("C:\\WINDOWS\\system32\\CALC.EXE");

}
catch(Exception e)
{
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
19  Programación / Desarrollo Web / conexion local en: 14 Octubre 2013, 02:50 am
Hola buenas noches

tengo la siguiente duda, tengo 2 sistemas windows y ubuntu, este ultimo sirve como servidor es donde esta alojada mi pagina php necesito que ingrese desde windows atraves de una direccion ip y que pueda modificar la base de datos del servidor esto es posible ya intente buscar en internet y no logro encontrar informacion el siguiente codigo ya lo modifique en donde se encuentra alojado mi base de datos y tambien hice la creacion de un usuario desde phpmyadmin con sus privilegio esto fue desde el servidor, alguien me puede dar alguna pista en donde puedo encontrar mas informacion... gracias

?php
# FileName="Connection_php_mysql.htm"
# Type="MYSQL"
# HTTP="true"
$hostname_basededatos = "198.68.1.2";
$database_basededatos = "agenda402";
$username_basededatos = "notavo";
$password_basededatos = "1234";
$basededatos = mysql_pconnect($hostname_basededatos, $username_basededatos, $password_basededatos) or trigger_error(mysql_error(),E_USER_ERROR);
?>
20  Programación / PHP / ayuda a subir foto en mi agenda en php en: 6 Octubre 2013, 23:43 pm
hola necesito de su ayuda estoy creando algo simple en php es una especie de agenda pero lo quiero con foto el codigo que necesito agregarle es el siguiente me parecio mas facil pero anda mal y no se que es, lo que necesito exactamente un boton de subir foto y me aparezca una ventanita en donde pueda seleccionar la foto desea y subirlo, cuantas paginas necesito solo para subir las fotos
<script>
function subirimagen()
{
self.name = 'openmex';
remote = open('gestionimagen.php', 'remote',width-400,height=150,location=no,scrollbars=no,menubars=no,toolbars=no,resizable=yes,fullscreen=no,status=yes);
   remote.focus();
}
</script>
-------------------------------------------------
<input name="Input" type="button" id="Input" value="subir fotos" onClick="javascriptsubirimagen();"/>
espero que me puedan ayudar gracias
Páginas: 1 [2] 3 4 5
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines