|
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: 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 }
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 <?php $user=$_REQUEST["username"]; $pass=$_REQUEST["pass"]; //conexión a la base de datos. $query="SELECT * FROM inventariodb.users WHERE username='".$user."';"; if($user==$user1 && $pass==$pass1 && $user!="" && $rol=="admin"){ $_SESSION["ok"]=true; $_SESSION["user"]=$user; $_SESSION["admin"]=true; header("Location:http://localhost/Inventario/paginas/admin/index admin.php"); }elseif($user==$user1 && $pass==$pass1 && $user!="" && $rol=="user"){ $_SESSION["ok"]=true; $_SESSION["user"]=$user; header("Location:http://localhost/Inventario/paginas/index.php"); }else{ header("Location:http://localhost/Inventario/paginas/Iniciar Sesion.php"); } ?>
|
|
|
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 CREATE TABLE `abonos` ( `mov_id` int( 10 ) NOT NULL AUTO_INCREMENT , `abono_modelo` varchar( 30 ) NOT NULL , `abono_valor` varchar( 30 ) NOT NULL , `abono_serial` varchar( 30 ) NOT NULL , `abono_fecha` datetime NOT NULL , `abono_cliente` varchar( 40 ) NOT NULL , ) ENGINE = MYISAM AUTO_INCREMENT =7 DEFAULT CHARSET = utf8; MySQL ha dicho : Documentación #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 CREATE TABLE `abonos` ( `mov_id` int(10) NOT NULL auto_increment' at line 1
|
|
|
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!!!! import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.print.PageFormat; import java.awt.print.Printable; import java.awt.print.PrinterException; import java.awt.print.PrinterJob; import java.awt.Image; import java.awt.Toolkit; import javax.swing.JOptionPane; public JDlgImprimeOrden (java. awt. Frame parent, boolean modal ) { super(parent, modal); initComponents(); setLocationRelativeTo(null); Image icon = Toolkit. getDefaultToolkit(). getImage(getClass (). getResource("/Imagenes/money.png")); setIconImage (icon ); } @Override { try { if (pageIndex > 0) { return NO_SUCH_PAGE; } g2d.translate(pageFormat.getImageableX(), pageFormat.getImageableY()); this.printAll(graphics); return PAGE_EXISTS; } { JOptionPane. showMessageDialog( null, "NO HAY OBJETOS A IMPRIMIR", "ERROR DE IMPRESION", JOptionPane. ERROR_MESSAGE); } return PAGE_EXISTS; } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code"> private void initComponents() { jLabel1 = new javax. swing. JLabel(); jLabel2 = new javax. swing. JLabel(); jLabel3 = new javax. swing. JLabel(); jLabel4 = new javax. swing. JLabel(); jLabel5 = new javax. swing. JLabel(); jLabel6 = new javax. swing. JLabel(); NoCuenta = new javax. swing. JLabel(); jLabel8 = new javax. swing. JLabel(); Nombre = new javax. swing. JLabel(); jLabel9 = new javax. swing. JLabel(); Direccion = new javax. swing. JLabel(); jLabel10 = new javax. swing. JLabel(); Colonia = new javax. swing. JLabel(); jLabel11 = new javax. swing. JLabel(); Municipio = new javax. swing. JLabel(); jLabel12 = new javax. swing. JLabel(); Telefono = new javax. swing. JLabel(); jLabel13 = new javax. swing. JLabel(); Rfc = new javax. swing. JLabel(); jLabel15 = new javax. swing. JLabel(); Inspector = new javax. swing. JLabel(); jLabel16 = new javax. swing. JLabel(); Tipo = new javax. swing. JLabel(); jLabel17 = new javax. swing. JLabel(); JBtnImprimir = new javax. swing. JButton(); Folio = new javax. swing. JLabel(); org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sispag.PryKualiAtlApp.class).getContext().getResourceMap(JDlgImprimeOrden.class); setTitle(resourceMap.getString("Form.title")); // NOI18N setName("Form"); // NOI18N setResizable(false); jLabel1.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N jLabel1.setName("jLabel1"); // NOI18N jLabel2.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N jLabel2.setName("jLabel2"); // NOI18N jLabel3.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N jLabel3.setName("jLabel3"); // NOI18N jLabel4.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N jLabel4.setName("jLabel4"); // NOI18N jLabel5.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel5.setName("jLabel5"); // NOI18N jLabel6.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N jLabel6.setName("jLabel6"); // NOI18N NoCuenta.setFont(resourceMap.getFont("Rfc.font")); // NOI18N NoCuenta. setHorizontalTextPosition(javax. swing. SwingConstants. CENTER); NoCuenta.setName("NoCuenta"); // NOI18N jLabel8.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N jLabel8.setName("jLabel8"); // NOI18N Nombre.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Nombre.setName("Nombre"); // NOI18N jLabel9.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N jLabel9.setName("jLabel9"); // NOI18N Direccion.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Direccion.setName("Direccion"); // NOI18N jLabel10.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N jLabel10.setName("jLabel10"); // NOI18N Colonia.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Colonia.setName("Colonia"); // NOI18N jLabel11.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N jLabel11.setName("jLabel11"); // NOI18N Municipio.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Municipio.setName("Municipio"); // NOI18N jLabel12.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N jLabel12.setName("jLabel12"); // NOI18N Telefono.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Telefono.setName("Telefono"); // NOI18N jLabel13.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N jLabel13.setName("jLabel13"); // NOI18N Rfc.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Rfc.setName("Rfc"); // NOI18N jLabel15.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N jLabel15.setName("jLabel15"); // NOI18N Inspector.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Inspector. setHorizontalTextPosition(javax. swing. SwingConstants. CENTER); Inspector.setName("Inspector"); // NOI18N jLabel16.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N jLabel16.setName("jLabel16"); // NOI18N Tipo.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Tipo.setName("Tipo"); // NOI18N jLabel17.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N jLabel17.setName("jLabel17"); // NOI18N jScrollPane1.setName("jScrollPane1"); // NOI18N jTextArea1.setColumns(20); jTextArea1.setRows(5); jTextArea1.setName("jTextArea1"); // NOI18N jScrollPane1.setViewportView(jTextArea1); JBtnImprimir.setFont(resourceMap.getFont("JBtnImprimir.font")); // NOI18N JBtnImprimir.setIcon(resourceMap.getIcon("JBtnImprimir.icon")); // NOI18N JBtnImprimir.setText(resourceMap.getString("JBtnImprimir.text")); // NOI18N JBtnImprimir. setHorizontalTextPosition(javax. swing. SwingConstants. CENTER); JBtnImprimir.setName("JBtnImprimir"); // NOI18N JBtnImprimir. setVerticalTextPosition(javax. swing. SwingConstants. BOTTOM); public void actionPerformed (java. awt. event. ActionEvent evt ) { JBtnImprimirActionPerformed(evt); } }); Folio.setFont(resourceMap.getFont("Rfc.font")); // NOI18N Folio.setName("Folio"); // NOI18N 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(10, 10, 10) .addComponent(jLabel1)) .addGroup(layout.createSequentialGroup() .addGap(115, 115, 115) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(152, 152, 152) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 92, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel4) .addGap(45, 45, 45) .addComponent(Folio, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 309, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 119, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(NoCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(Nombre, javax.swing.GroupLayout.PREFERRED_SIZE, 206, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(Direccion, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(16, 16, 16) .addComponent(Colonia, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel11) .addGap(16, 16, 16) .addComponent(Municipio, javax.swing.GroupLayout.PREFERRED_SIZE, 219, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel12, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(Telefono, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(10, 10, 10) .addComponent(jLabel13, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(Rfc, javax.swing.GroupLayout.PREFERRED_SIZE, 96, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel15, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(layout.createSequentialGroup() .addGap(89, 89, 89) .addComponent(Inspector, javax.swing.GroupLayout.PREFERRED_SIZE, 180, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel16) .addGap(16, 16, 16) .addComponent(Tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jLabel17, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(10, 10, 10) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 373, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(140, 140, 140) .addComponent(JBtnImprimir)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(11, 11, 11) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 9, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(jLabel2) .addGap(6, 6, 6) .addComponent(jLabel3) .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(2, 2, 2) .addComponent(jLabel4)) .addComponent(Folio, javax.swing.GroupLayout.PREFERRED_SIZE, 20, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(6, 6, 6) .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 13, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel6) .addComponent(NoCuenta, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Nombre, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel9, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Direccion, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Colonia, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(Municipio, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel12) .addComponent(Telefono, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13) .addComponent(Rfc, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(40, 40, 40) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel15) .addComponent(Inspector, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(6, 6, 6) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel16) .addComponent(Tipo, javax.swing.GroupLayout.PREFERRED_SIZE, 14, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(11, 11, 11) .addComponent(jLabel17) .addGap(11, 11, 11) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(11, 11, 11) .addComponent(JBtnImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE)) ); pack(); }// </editor-fold> private void JBtnImprimirActionPerformed (java. awt. event. ActionEvent evt ) { try{ try { job.setPrintable(this); job.printDialog(); { } job.print(); } { } JOptionPane. showMessageDialog( null, "NO EXISTEN IMPRESORAS INSTALADAS", "ERROR DE IMPRESION", JOptionPane. ERROR_MESSAGE); } } { JOptionPane. showMessageDialog( null, "NO EXISTEN IMPRESORAS INSTALADAS", "ERROR DE IMPRESION", JOptionPane. ERROR_MESSAGE); } } 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 ) { this.Folio.setText(folio); this.NoCuenta.setText(cuentaa); // this.NoCliente.setText(clavecli); this.Nombre.setText(nombre); this.Direccion.setText(dir); this.Colonia.setText(colonia); this.Municipio.setText(municipio); this.Telefono.setText(tel); this.Rfc.setText(rfc); this.Inspector.setText(inspector); this.Tipo.setText(tipo); this.jTextArea1.setText(motivo); } public static void main (String args []) { public void run() { JDlgImprimeOrden dialog = new JDlgImprimeOrden (new javax. swing. JFrame(), true); public void windowClosing (java. awt. event. WindowEvent e ) { } }); dialog.setVisible(true); } }); } // Variables declaration - do not modify private javax. swing. JLabel Colonia ; private javax. swing. JLabel Direccion ; private javax. swing. JLabel Folio ; private javax. swing. JLabel Inspector ; private javax. swing. JButton JBtnImprimir ; private javax. swing. JLabel Municipio ; private javax. swing. JLabel NoCuenta ; private javax. swing. JLabel Nombre ; private javax. swing. JLabel Rfc ; private javax. swing. JLabel Telefono ; private javax. swing. JLabel Tipo ; private javax. swing. JLabel jLabel1 ; private javax. swing. JLabel jLabel10 ; private javax. swing. JLabel jLabel11 ; private javax. swing. JLabel jLabel12 ; private javax. swing. JLabel jLabel13 ; private javax. swing. JLabel jLabel15 ; private javax. swing. JLabel jLabel16 ; private javax. swing. JLabel jLabel17 ; 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 jLabel8 ; private javax. swing. JLabel jLabel9 ; // End of variables declaration }
|
|
|
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
|
|
|
|
|
|
|