¿que hago mal?
Publicado por david (2 intervenciones) el 12/07/2008 13:37:08
soy nuevo en esto del java y he creado un programa para mostrar una etiqueta en la pantalla por medio del netbeans y no hay forma de hacerlo funcionar, hay dos archivos el main en un paquete y el de formulario en otro paquete, lo tengo que hacer asi , os pongo los textos de los archivos ¿que hago mal?
package pokermania;
import paneles.principal.*;
EL main
public class Main {
public static void main(String[] args) {
principal();
}
}
Y el archivo de graficos,
package paneles;
/**
*
* @author Administrador
*/
public class principal extends javax.swing.JPanel {
/** Creates new form principal */
public principal() {
initComponents();
}
/** 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() {
jLabel1 = new javax.swing.JLabel();
jLabel1.setText("jLabel1");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(173, 173, 173)
.addComponent(jLabel1)
.addContainerGap(193, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(138, 138, 138)
.addComponent(jLabel1)
.addContainerGap(148, Short.MAX_VALUE))
);
}// </editor-fold>
// Variables declaration - do not modify
private javax.swing.JLabel jLabel1;
// End of variables declaration
}
no tengo ni idea de lo que poasa, muchas gracias de antemano por la respuesta
package pokermania;
import paneles.principal.*;
EL main
public class Main {
public static void main(String[] args) {
principal();
}
}
Y el archivo de graficos,
package paneles;
/**
*
* @author Administrador
*/
public class principal extends javax.swing.JPanel {
/** Creates new form principal */
public principal() {
initComponents();
}
/** 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() {
jLabel1 = new javax.swing.JLabel();
jLabel1.setText("jLabel1");
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(173, 173, 173)
.addComponent(jLabel1)
.addContainerGap(193, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(138, 138, 138)
.addComponent(jLabel1)
.addContainerGap(148, Short.MAX_VALUE))
);
}// </editor-fold>
// Variables declaration - do not modify
private javax.swing.JLabel jLabel1;
// End of variables declaration
}
no tengo ni idea de lo que poasa, muchas gracias de antemano por la respuesta
Valora esta pregunta


0