Clase JFrame… Aquí realizamos todos los procesos
Package Grafico;
package figo;
public class NewJFrame extends javax.swing.JFrame {
/** Creates new form NewJFrame */
public NewJFrame() {
initComponents();
}
@SuppressWarnings("unchecked")
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new NewJFrame().setVisible(true);
}
});
}
// Variables declaration - do not modify
private javax.swing.JButton jButton1;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JPanel jPanel1;
private javax.swing.JTextField tx0;
private javax.swing.JTextField tx1;
private javax.swing.JTextField ty0;
private javax.swing.JTextField ty1;
// End of variables declaration
}
Clase JPanel o Clase principal… Aquí llamamos las operaciones realizadas en la clase anterior y es donde se va a ejecutar el programa
Package Grafico;
public class NewJPanel extends javax.swing.JPanel {
public NewJPanel() {
initComponents();
}
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">
private void initComponents() {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);
}// </editor-fold>
// Variables declaration - do not modify
// End of variables declaration
}
Ventana de la ejecucion
No hay comentarios:
Publicar un comentario