Está en la página 1de 48

“AÑO DEL BUEN SERVICIO AL

CIUDADANO”
UNIVERSIDAD NACIONAL DEL
CENTRO DEL PERÚ
FACULTAD DE INGENIERÍA DE SISTEMAS

Curso : 035A Metodología de la Programación II


Docente : Mg. Samaniego Flores, Conny
Alumno : De la Calle Coz, Carlos Daniel
Soto Pacheco, Eliana
Suarez Torres, Dorcas Ruth
Valencia López, Juan Carlos
Salón : 203 FIS – LAB. 01
EL TAMBO-HUANCAYO
2017
DEDICATORIA
Dedicamos el presente trabajo de investigación
a nuestros padres, familiares y a Dios. A
nuestros padres y familiares porque a lo largo
de nuestra vida han velado por nuestro
bienestar y educación siendo nuestro apoyo en
todo momento, depositando su confianza en
cada reto que se nos presenta sin dudar en la
inteligencia y capacidad que poseemos; y a Dios
que ha estado con nosotros en cada paso que
damos, cuidándonos y dándonos fortaleza para
continuar.
Contenido
CAPITULO I: GUI – MATRIZ ............................................................................................... 4
Paquete Interfaz ........................................................................................................... 4
IngresarDatosPropiedades ....................................................................................... 4
Codificación .......................................................................................................... 4
Interfaz Gráfica ................................................................................................... 18
IngresarDatosTipos ................................................................................................. 19
Codificación ........................................................................................................ 19
Interfaz Gráfica ................................................................................................... 23
Int ............................................................................................................................ 24
Codificación ........................................................................................................ 24
Interfaz Gráfica ................................................................................................... 28
Matriz (JFrame Form Principal) ..................................................................... 29
Codificación ........................................................................................................ 29
Interfaz Gráfica ................................................................................................... 33
Mostrar ................................................................................................................... 34
Codificación ........................................................................................................ 34
Interfaz Gráfica ................................................................................................... 48
CAPITULO I:
GUI – MATRIZ
Paquete Interfaz
IngresarDatosPropiedades
Codificación
/* */
* To change this license header, public IngresarDatosPropiedades() {
choose License Headers in Project initComponents();
Properties. this.setLocationRelativeTo(null);
* To change this template file, choose }
Tools | Templates private void carga(){
* and open the template in the editor. modeloA.setColumnCount(2);
*/ modeloA.setRowCount(2);
package Interfaz; modeloB.setColumnCount(2);
modeloB.setRowCount(2);
import jTable1.setModel(modeloA);
java.util.InputMismatchException; jTable2.setModel(modeloB);
import javax.swing.JOptionPane; modeloC.setColumnCount(2);
import modeloC.setRowCount(2);
javax.swing.table.DefaultTableModel; jTable3.setModel(modeloC);
}
/** /**
* * This method is called from within
* @author USUARIO the constructor to initialize the form.
*/ * WARNING: Do NOT modify this
public class IngresarDatosPropiedades code. The content of this method is
extends javax.swing.JFrame { always
* regenerated by the Form Editor.
DefaultTableModel modeloA=new */
DefaultTableModel(); @SuppressWarnings("unchecked")
DefaultTableModel modeloB=new // <editor-fold
DefaultTableModel(); defaultstate="collapsed"
DefaultTableModel modeloC=new desc="Generated Code">
DefaultTableModel(); private void initComponents() {

public static String filas1="" ; jLabelMatriz1 = new


public static String columnas1=""; javax.swing.JLabel();
public static String filas2="" ; jLabelMatriz2 = new
public static String columnas2=""; javax.swing.JLabel();
/** jLabelFilas = new
* Creates new form javax.swing.JLabel();
IngresarDatosPropiedades
jLabelColumnas = new
javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.
jTextFieldFilasPM = new WindowConstants.EXIT_ON_CLOSE);
javax.swing.JTextField(); setLocationByPlatform(true);
jTextFieldFilasSM = new setUndecorated(true);
javax.swing.JTextField();
jTextFieldColumnasPM = new jLabelMatriz1.setText("Primera
javax.swing.JTextField(); Matriz");
jTextFieldColumnaSM = new
javax.swing.JTextField(); jLabelMatriz2.setText("Segunda
jPanel1 = new javax.swing.JPanel(); Matriz");
jScrollPane3 = new
javax.swing.JScrollPane(); jLabelFilas.setText("Filas");
jTable3 = new javax.swing.JTable();
jScrollPane1 = new
javax.swing.JScrollPane(); jLabelColumnas.setText("Columnas");
jTable1 = new javax.swing.JTable();
jScrollPane2 = new
javax.swing.JScrollPane(); jTextFieldFilasPM.addActionListener(ne
jTable2 = new javax.swing.JTable(); w java.awt.event.ActionListener() {
jLabel1 = new javax.swing.JLabel(); public void
jLabel2 = new javax.swing.JLabel(); actionPerformed(java.awt.event.Action
jButtonSuma = new Event evt) {
javax.swing.JButton();
jButtonResta = new jTextFieldFilasPMActionPerformed(evt);
javax.swing.JButton(); }
jButtonMultiplicacion = new });
javax.swing.JButton();
jButtonTranspuesta = new jTable3.setModel(new
javax.swing.JButton(); javax.swing.table.DefaultTableModel(
jButtonEspiral = new new Object [][] {
javax.swing.JButton();
jLabel3 = new javax.swing.JLabel(); },
jButton1 = new new String [] {
javax.swing.JButton();
jButton2 = new }
javax.swing.JButton(); ));
jButtonGenerar = new
javax.swing.JButton(); jScrollPane3.setViewportView(jTable3);
jButton3 = new
javax.swing.JButton();
jButton4 = new jTable1.setAutoCreateRowSorter(true);
javax.swing.JButton(); jTable1.setModel(new
javax.swing.table.DefaultTableModel(
new Object [][] { jButtonSuma.setEnabled(false);

}, jButtonSuma.addActionListener(new
new String [] { java.awt.event.ActionListener() {
public void
} actionPerformed(java.awt.event.Action
)); Event evt) {

jScrollPane1.setViewportView(jTable1); jButtonSumaActionPerformed(evt);
}
});
jTable2.setAutoCreateRowSorter(true);
jTable2.setBackground(new jButtonResta.setText("Restar");
java.awt.Color(0, 0, 204)); jButtonResta.setEnabled(false);

jTable2.setBorder(javax.swing.BorderFa jButtonResta.addActionListener(new
ctory.createBevelBorder(javax.swing.bo java.awt.event.ActionListener() {
rder.BevelBorder.RAISED, public void
java.awt.SystemColor.activeCaptionTex actionPerformed(java.awt.event.Action
t, new java.awt.Color(0, 0, 0), new Event evt) {
java.awt.Color(0, 204, 204),
java.awt.SystemColor.activeCaptionTex jButtonRestaActionPerformed(evt);
t)); }
jTable2.setForeground(new });
java.awt.Color(255, 51, 0));
jTable2.setModel(new
javax.swing.table.DefaultTableModel( jButtonMultiplicacion.setText("Mutiplic
new Object [][] { ar");

}, jButtonMultiplicacion.setEnabled(false)
new String [] { ;

} jButtonMultiplicacion.addActionListene
)); r(new java.awt.event.ActionListener() {
jTable2.setEnabled(false); public void
actionPerformed(java.awt.event.Action
jScrollPane2.setViewportView(jTable2); Event evt) {

jLabel1.setText("Matriz jButtonMultiplicacionActionPerformed(
Solicitada"); evt);
}
jLabel2.setText("Primera Matriz"); });

jButtonSuma.setText("Sumar");
jButton2.addActionListener(new
jButtonTranspuesta.setText("Transpues java.awt.event.ActionListener() {
ta"); public void
actionPerformed(java.awt.event.Action
jButtonTranspuesta.setEnabled(false); Event evt) {

jButtonTranspuesta.addActionListener( jButton2ActionPerformed(evt);
new java.awt.event.ActionListener() { }
public void });
actionPerformed(java.awt.event.Action
Event evt) { jButtonGenerar.setText("GENERAR
MATRIZ");
jButtonTranspuestaActionPerformed(e
vt); jButtonGenerar.addActionListener(new
} java.awt.event.ActionListener() {
}); public void
actionPerformed(java.awt.event.Action
jButtonEspiral.setText("Generar Event evt) {
Espiral");
jButtonGenerarActionPerformed(evt);
jButtonEspiral.addActionListener(new }
java.awt.event.ActionListener() { });
public void
actionPerformed(java.awt.event.Action javax.swing.GroupLayout
Event evt) { jPanel1Layout = new
javax.swing.GroupLayout(jPanel1);
jButtonEspiralActionPerformed(evt); jPanel1.setLayout(jPanel1Layout);
} jPanel1Layout.setHorizontalGroup(
});
jPanel1Layout.createParallelGroup(java
jLabel3.setText("Segunda Matriz"); x.swing.GroupLayout.Alignment.LEADI
NG)
jButton1.setText("Habilitar"); .addGroup(jPanel1Layout.create
jButton1.addActionListener(new SequentialGroup()
java.awt.event.ActionListener() { .addGroup(jPanel1Layout.crea
public void teParallelGroup(javax.swing.GroupLayo
actionPerformed(java.awt.event.Action ut.Alignment.LEADING)
Event evt) { .addGroup(jPanel1Layout.cr
eateSequentialGroup()
jButton1ActionPerformed(evt); .addGap(6, 6, 6)
} .addComponent(jLabel3)
}); .addPreferredGap(javax.s
wing.LayoutStyle.ComponentPlacemen
jButton2.setText("Habilitar"); t.UNRELATED)
.addComponent(jButton1) .addComponent(jLabel2)
) .addGroup(jPanel1Layout.cr
.addGroup(jPanel1Layout.cr eateSequentialGroup()
eateSequentialGroup() .addComponent(jButtonS
.addContainerGap() uma,
.addComponent(jScrollPa javax.swing.GroupLayout.PREFERRED_S
ne2, IZE, 120,
javax.swing.GroupLayout.PREFERRED_S javax.swing.GroupLayout.PREFERRED_S
IZE, 283, IZE)
javax.swing.GroupLayout.PREFERRED_S .addPreferredGap(javax.s
IZE))) wing.LayoutStyle.ComponentPlacemen
.addPreferredGap(javax.swing. t.UNRELATED)
LayoutStyle.ComponentPlacement.REL .addGroup(jPanel1Layout.
ATED, 27, Short.MAX_VALUE) createParallelGroup(javax.swing.Group
.addGroup(jPanel1Layout.crea Layout.Alignment.LEADING)
teParallelGroup(javax.swing.GroupLayo .addComponent(jButto
ut.Alignment.LEADING) n2)
.addGroup(javax.swing.Grou .addGroup(jPanel1Layo
pLayout.Alignment.TRAILING, ut.createSequentialGroup()
jPanel1Layout.createSequentialGroup() .addComponent(jButt
.addComponent(jLabel1) onResta,
.addGap(202, 202, 202)) javax.swing.GroupLayout.PREFERRED_S
.addGroup(javax.swing.Grou IZE, 120,
pLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_S
jPanel1Layout.createSequentialGroup() IZE)
.addComponent(jScrollPa .addPreferredGap(jav
ne3, ax.swing.LayoutStyle.ComponentPlace
javax.swing.GroupLayout.PREFERRED_S ment.UNRELATED)
IZE, 392, .addComponent(jButt
javax.swing.GroupLayout.PREFERRED_S onMultiplicacion,
IZE) javax.swing.GroupLayout.PREFERRED_S
.addContainerGap()))) IZE, 120,
.addGroup(jPanel1Layout.create javax.swing.GroupLayout.PREFERRED_S
SequentialGroup() IZE)
.addContainerGap() .addPreferredGap(jav
.addGroup(jPanel1Layout.crea ax.swing.LayoutStyle.ComponentPlace
teParallelGroup(javax.swing.GroupLayo ment.UNRELATED)
ut.Alignment.LEADING) .addComponent(jButt
.addComponent(jScrollPane onTranspuesta,
1, javax.swing.GroupLayout.PREFERRED_S
javax.swing.GroupLayout.PREFERRED_S IZE, 120,
IZE, 283, javax.swing.GroupLayout.PREFERRED_S
javax.swing.GroupLayout.PREFERRED_S IZE)
IZE)
.addPreferredGap(jav .addComponent(jButtonEspi
ax.swing.LayoutStyle.ComponentPlace ral))
ment.UNRELATED) .addGap(18, 18, 18)
.addComponent(jButt .addGroup(jPanel1Layout.crea
onEspiral, teParallelGroup(javax.swing.GroupLayo
javax.swing.GroupLayout.PREFERRED_S ut.Alignment.LEADING)
IZE, 146, .addGroup(jPanel1Layout.cr
javax.swing.GroupLayout.PREFERRED_S eateSequentialGroup()
IZE))))) .addGroup(jPanel1Layout.
.addContainerGap(javax.swing createParallelGroup(javax.swing.Group
.GroupLayout.DEFAULT_SIZE, Layout.Alignment.BASELINE)
Short.MAX_VALUE)) .addComponent(jLabel2
.addGroup(javax.swing.GroupLay )
out.Alignment.TRAILING, .addComponent(jButto
jPanel1Layout.createSequentialGroup() n2))
.addContainerGap(javax.swing .addPreferredGap(javax.s
.GroupLayout.DEFAULT_SIZE, wing.LayoutStyle.ComponentPlacemen
Short.MAX_VALUE) t.RELATED)
.addComponent(jButtonGener .addComponent(jScrollPa
ar) ne1,
.addGap(220, 220, 220)) javax.swing.GroupLayout.PREFERRED_S
); IZE, 130,
jPanel1Layout.setVerticalGroup( javax.swing.GroupLayout.PREFERRED_S
IZE)
jPanel1Layout.createParallelGroup(java .addGap(27, 27, 27)
x.swing.GroupLayout.Alignment.LEADI .addGroup(jPanel1Layout.
NG) createParallelGroup(javax.swing.Group
.addGroup(jPanel1Layout.create Layout.Alignment.BASELINE)
SequentialGroup() .addComponent(jLabel3
.addContainerGap() )
.addComponent(jButtonGener .addComponent(jButto
ar) n1))
.addGap(14, 14, 14) .addPreferredGap(javax.s
.addGroup(jPanel1Layout.crea wing.LayoutStyle.ComponentPlacemen
teParallelGroup(javax.swing.GroupLayo t.RELATED, 18, Short.MAX_VALUE)
ut.Alignment.BASELINE) .addComponent(jScrollPa
.addComponent(jButtonSum ne2,
a) javax.swing.GroupLayout.PREFERRED_S
.addComponent(jButtonRest IZE, 125,
a) javax.swing.GroupLayout.PREFERRED_S
.addComponent(jButtonMul IZE))
tiplicacion) .addGroup(jPanel1Layout.cr
.addComponent(jButtonTra eateSequentialGroup()
nspuesta) .addComponent(jLabel1)
.addPreferredGap(javax.s .addGroup(layout.createParall
wing.LayoutStyle.ComponentPlacemen elGroup(javax.swing.GroupLayout.Align
t.UNRELATED) ment.LEADING)
.addComponent(jScrollPa .addGroup(layout.createSeq
ne3, uentialGroup()
javax.swing.GroupLayout.PREFERRED_S .addContainerGap(javax.s
IZE, 0, Short.MAX_VALUE))) wing.GroupLayout.DEFAULT_SIZE,
.addContainerGap()) Short.MAX_VALUE)
); .addGroup(layout.createP
arallelGroup(javax.swing.GroupLayout.
jButton3.setText("Salir"); Alignment.LEADING)
jButton3.addActionListener(new .addGroup(layout.creat
java.awt.event.ActionListener() { eSequentialGroup()
public void .addComponent(jLab
actionPerformed(java.awt.event.Action elColumnas)
Event evt) { .addGap(0, 0,
Short.MAX_VALUE))
jButton3ActionPerformed(evt); .addGroup(layout.creat
} eSequentialGroup()
}); .addGap(130, 130,
130)
jButton4.setText("Volver"); .addComponent(jLab
jButton4.addActionListener(new elMatriz1)
java.awt.event.ActionListener() { .addGap(111, 111,
public void 111)
actionPerformed(java.awt.event.Action .addComponent(jLab
Event evt) { elMatriz2)
.addPreferredGap(jav
jButton4ActionPerformed(evt); ax.swing.LayoutStyle.ComponentPlace
} ment.RELATED,
}); javax.swing.GroupLayout.DEFAULT_SIZ
E, Short.MAX_VALUE)
javax.swing.GroupLayout layout = .addComponent(jButt
new on3))
javax.swing.GroupLayout(getContentPa .addGroup(layout.creat
ne()); eSequentialGroup()
.addComponent(jLab
getContentPane().setLayout(layout); elFilas)
layout.setHorizontalGroup( .addGap(91, 91, 91)
.addGroup(layout.cre
layout.createParallelGroup(javax.swing. ateParallelGroup(javax.swing.GroupLay
GroupLayout.Alignment.LEADING) out.Alignment.TRAILING)
.addGroup(layout.createSequent .addComponent(jT
ialGroup() extFieldColumnasPM,
javax.swing.GroupLayout.PREFERRED_S
IZE, 104, layout.createParallelGroup(javax.swing.
javax.swing.GroupLayout.PREFERRED_S GroupLayout.Alignment.LEADING)
IZE) .addGroup(layout.createSequent
.addComponent(jT ialGroup()
extFieldFilasPM, .addContainerGap(13,
javax.swing.GroupLayout.PREFERRED_S Short.MAX_VALUE)
IZE, 104, .addGroup(layout.createParall
javax.swing.GroupLayout.PREFERRED_S elGroup(javax.swing.GroupLayout.Align
IZE)) ment.BASELINE)
.addGap(83, 83, 83) .addComponent(jLabelMatri
.addGroup(layout.cre z1)
ateParallelGroup(javax.swing.GroupLay .addComponent(jLabelMatri
out.Alignment.LEADING) z2)
.addGroup(layout.c .addComponent(jButton3))
reateSequentialGroup() .addGap(22, 22, 22)
.addComponent(j .addGroup(layout.createParall
TextFieldFilasSM, elGroup(javax.swing.GroupLayout.Align
javax.swing.GroupLayout.PREFERRED_S ment.BASELINE)
IZE, 96, .addComponent(jLabelFilas)
javax.swing.GroupLayout.PREFERRED_S .addComponent(jTextFieldFi
IZE) lasPM,
.addPreferredGa javax.swing.GroupLayout.PREFERRED_S
p(javax.swing.LayoutStyle.ComponentP IZE,
lacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZ
javax.swing.GroupLayout.DEFAULT_SIZ E,
E, Short.MAX_VALUE) javax.swing.GroupLayout.PREFERRED_S
.addComponent(j IZE)
Button4)) .addComponent(jTextFieldFi
.addComponent(jT lasSM,
extFieldColumnaSM, javax.swing.GroupLayout.PREFERRED_S
javax.swing.GroupLayout.PREFERRED_S IZE,
IZE, 96, javax.swing.GroupLayout.DEFAULT_SIZ
javax.swing.GroupLayout.PREFERRED_S E,
IZE))))) javax.swing.GroupLayout.PREFERRED_S
.addComponent(jPanel1, IZE)
javax.swing.GroupLayout.DEFAULT_SIZ .addComponent(jButton4))
E, .addGap(23, 23, 23)
javax.swing.GroupLayout.DEFAULT_SIZ .addGroup(layout.createParall
E, Short.MAX_VALUE)) elGroup(javax.swing.GroupLayout.Align
.addContainerGap()) ment.BASELINE)
); .addComponent(jTextFieldC
layout.setVerticalGroup( olumnasPM,
javax.swing.GroupLayout.PREFERRED_S
IZE, int
javax.swing.GroupLayout.DEFAULT_SIZ Afila=Integer.parseInt(jTextFieldFilasP
E, M.getText());
javax.swing.GroupLayout.PREFERRED_S int
IZE) Acol=Integer.parseInt(jTextFieldColumn
.addComponent(jTextFieldC asPM.getText());
olumnaSM, int
javax.swing.GroupLayout.PREFERRED_S Bfila=Integer.parseInt(jTextFieldFilasSM
IZE, .getText());
javax.swing.GroupLayout.DEFAULT_SIZ int
E, Bcol=Integer.parseInt(jTextFieldColumn
javax.swing.GroupLayout.PREFERRED_S aSM.getText());
IZE) for(i=0;i<Afila;i++){
.addComponent(jLabelColu for(j=0;j<Bcol;j++){
mnas)) for(r=0;r<Acol;r++){
.addGap(18, 18, 18)
.addComponent(jPanel1, S=S+Integer.parseInt(modeloA.getValu
javax.swing.GroupLayout.PREFERRED_S eAt(i,
IZE, r).toString())*Integer.parseInt(modeloB
javax.swing.GroupLayout.DEFAULT_SIZ .getValueAt(r, j).toString());
E, }
javax.swing.GroupLayout.PREFERRED_S modeloC.setValueAt(S+"", i,
IZE)) j);
); S=0;
}
pack(); }
}// </editor-fold> }catch(java.lang.NullPointerExcepti
on |java.lang.NumberFormatException
private void e){
jTextFieldFilasPMActionPerformed(java
.awt.event.ActionEvent evt) { JOptionPane.showMessageDialog(null,
// TODO add your handling code "No se permiten letras o casilleros en
here: blanco", ("Error: "+e), 2);
} }
}
private void
jButtonMultiplicacionActionPerformed( private void
java.awt.event.ActionEvent evt) { jButtonSumaActionPerformed(java.awt
jTable1.setEnabled(true); .event.ActionEvent evt) {
jTable2.setEnabled(true); try{
try{ jTable1.setEnabled(true);
int r,i,j,S=0; jTable2.setEnabled(true);
int r,i,j,S=0;
int Se produjo un error
Afila=Integer.parseInt(jTextFieldFilasP inesperado\nError:"+e);
M.getText()); }
int */
Bcol=Integer.parseInt(jTextFieldColumn }
aSM.getText());
for(i=0;i<Afila;i++){ private void
for(j=0;j<Bcol;j++){ jButtonRestaActionPerformed(java.awt
.event.ActionEvent evt) {
r=Integer.parseInt(modeloA.getValueAt jTable1.setEnabled(true);
(i, jTable2.setEnabled(true);
j).toString())+Integer.parseInt(modeloB. try{
getValueAt(i, j).toString()); int r,i,j,S=0;
int
modeloC.setValueAt(r+"", i, j); Afila=Integer.parseInt(jTextFieldFilasP
r=0; M.getText());
} int
}}catch(java.lang.RuntimeException Bcol=Integer.parseInt(jTextFieldColumn
e){ aSM.getText());
for(i=0;i<Afila;i++){
JOptionPane.showMessageDialog(null, for(j=0;j<Bcol;j++){
"No se permiten letras o casilleros en
blanco",("Error: "+e), 2); r=Integer.parseInt(modeloA.getValueAt
}catch(Exception e){ (i, j).toString())-
Integer.parseInt(modeloB.getValueAt(i,
JOptionPane.showMessageDialog(null, j).toString());
"Error inesperado",("Error: "+e), 2);
} modeloC.setValueAt(r+"", i, j);
/* r=0;
}catch(NumberFormatException }}}catch(java.lang.NumberFormatE
ex){ xception|java.lang.NullPointerExceptio
n e){
JOptionPane.showMessageDialog(null,"
Por favor ingrese numeros"); JOptionPane.showMessageDialog(null,
}catch(java.lang.ArrayIndexOutOfB "No se permiten letras o casilleros en
oundsException ex){ blanco", ("Error eliana"+e), 2);
}
JOptionPane.showMessageDialog(null," }
Se produjo un error de
desbordamiento\nSe le recomienda no private void
poner numeros tan grandes"); jButtonEspiralActionPerformed(java.aw
}catch(Exception e){ t.event.ActionEvent evt) {
jTable3.setEnabled(false);
JOptionPane.showMessageDialog(null," jTable2.setEnabled(false);
jTable1.setEnabled(false);
try{ }
int n =
Integer.parseInt(jTextFieldFilasPM.getT }catch(java.lang.NullPointerExcepti
ext()); on | java.lang.NumberFormatException
e){//hay espacios en blanco --- no se
mostrarEspiral(generarEspiral(n,1),n,n); relleno datos
}catch(java.lang.NullPointerExcepti
on|java.lang.NumberFormatException JOptionPane.showMessageDialog(null,
e){ "No se permite letras o casilleros en
blanco", ("Error:"+e), 2);
JOptionPane.showMessageDialog(null, }
"Ingrese los datos necesarios ", ("Error:
"+e), 2);
} }
}
private void
private void jButton1ActionPerformed(java.awt.eve
jButtonTranspuestaActionPerformed(ja nt.ActionEvent evt) {
va.awt.event.ActionEvent evt) { jTable2.setEnabled(true);
jTable1.setEnabled(true); }
jTable3.setEnabled(false);
jTable2.setEnabled(false); private void
int r = 0; jButton2ActionPerformed(java.awt.eve
int Afila=0; nt.ActionEvent evt) {
int Bfil=0;
try{ jTable1.setVisible(true);
String Afilas="",Bfilas="";
}
Afilas=jTextFieldFilasPM.getText();
Bfilas = private void
jTextFieldColumnasPM.getText(); jButtonGenerarActionPerformed(java.a
wt.event.ActionEvent evt) {
Afila = Integer.parseInt(Afilas); try{
Bfil = Integer.parseInt(Bfilas);
int mat[][] = new int [Afila][Bfil];
for (int i = 0; i < Afila; i++) { int
for (int j = 0; j < Bfil; j++) { Afila=Integer.parseInt(jTextFieldFilasP
M.getText());
r=Integer.parseInt(modeloA.getValueAt int
(i, j).toString()); Acol=Integer.parseInt(jTextFieldColumn
jTable3.setValueAt(r+"", j, i); asPM.getText());
r=0;
}
int "No se acepta letras o\nespacios en
Bfila=Integer.parseInt(jTextFieldFilasSM blanco",("ERROR: "+e),2);
.getText());
int }
Bcol=Integer.parseInt(jTextFieldColumn
aSM.getText()); }

private void
if jButton3ActionPerformed(java.awt.eve
((Acol!=Bfila)){//&(Acol!=Afila)&(Acol!= nt.ActionEvent evt) {
Bcol) Int traer = new Int();
traer.setVisible(true);
JOptionPane.showMessageDialog(null," this.setVisible(false);
La columna de A debe ser igual a fila de }
B");
private void
jButton4ActionPerformed(java.awt.eve
jButtonMultiplicacion.setEnabled(false) nt.ActionEvent evt) {
; Matriz abrir = new Matriz();
abrir.setVisible(true);
jButtonTranspuesta.setEnabled(false); this.setVisible(false);
}else{ }
genA(Afila,Acol); private void genA(int fil,int col){
genB(Bfila,Bcol);
genC(Afila,Bcol); modeloA.setRowCount(fil);
modeloA.setColumnCount(col);
if((Acol==Bfila)&(Acol==Afila)&(Acol==B jTable1.setModel(modeloA);
col)){ }
jButtonSuma.setEnabled(true); private void genB(int fil,int col){
jButtonResta.setEnabled(true); modeloB.setRowCount(fil);
}else{ modeloB.setColumnCount(col);
jButtonSuma.setEnabled(false); jTable2.setModel(modeloB);
jButtonResta.setEnabled(false); }
} private void genC(int fil,int col){
modeloC.setColumnCount(col);
jButtonMultiplicacion.setEnabled(true); modeloC.setRowCount(fil);
jTable3.setModel(modeloC);}
jButtonTranspuesta.setEnabled(true);
} /**
}catch(java.lang.RuntimeException * @param args the command line
e){ arguments
*/
JOptionPane.showMessageDialog(this, public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold } catch
defaultstate="collapsed" desc=" Look (javax.swing.UnsupportedLookAndFeel
and feel setting code (optional) "> Exception ex) {
/* If Nimbus (introduced in Java SE
6) is not available, stay with the default java.util.logging.Logger.getLogger(Ingre
look and feel. sarDatosPropiedades.class.getName()).l
* For details see og(java.util.logging.Level.SEVERE, null,
http://download.oracle.com/javase/tut ex);
orial/uiswing/lookandfeel/plaf.html }
*/ //</editor-fold>
try {
for /* Create and display the form */
(javax.swing.UIManager.LookAndFeelIn
fo info : java.awt.EventQueue.invokeLater(new
javax.swing.UIManager.getInstalledLoo Runnable() {
kAndFeels()) { public void run() {
if new
("Nimbus".equals(info.getName())) { IngresarDatosPropiedades().setVisible(t
rue);
javax.swing.UIManager.setLookAndFeel }
(info.getClassName()); });
break; }
} public void mostrarEspiral(int
} matriz[][] , int f,int c){
} catch (ClassNotFoundException DefaultTableModel model =
ex) { (DefaultTableModel)
jTable3.getModel();
java.util.logging.Logger.getLogger(Ingre model.setRowCount(f);
sarDatosPropiedades.class.getName()).l model.setColumnCount(c);
og(java.util.logging.Level.SEVERE, null, for (int i = 1; i < f+1; i++) {
ex); for (int j = 1; j < c+1; j++) {
} catch (InstantiationException ex) { jTable3.setValueAt(matriz[i][j],
i-1, j-1);
java.util.logging.Logger.getLogger(Ingre }
sarDatosPropiedades.class.getName()).l }
og(java.util.logging.Level.SEVERE, null, }
ex);
} catch (IllegalAccessException ex) { private int [][] generarEspiral(int n,
int x ){
java.util.logging.Logger.getLogger(Ingre int [][] matriz = new int [n+1][n+1];
sarDatosPropiedades.class.getName()).l
og(java.util.logging.Level.SEVERE, null,
ex); for (int i = 1; i <= n/2; i++) {
for (int j = i; j <=n-i; j++) {
matriz[i][j]=x; private javax.swing.JButton
x++; jButtonSuma;
} private javax.swing.JButton
for (int j = i; j <= n-i; j++) { jButtonTranspuesta;
matriz[i][n-i+1]=x; private javax.swing.JLabel jLabel1;
x++; private javax.swing.JLabel jLabel2;
} private javax.swing.JLabel jLabel3;
for (int j = n-i+1; j >=i+1; j--) { private javax.swing.JLabel
matriz[n-i+1][j]=x; jLabelColumnas;
x++; private javax.swing.JLabel jLabelFilas;
} private javax.swing.JLabel
for (int j = n-i+1; j >=i+1; j--) { jLabelMatriz1;
matriz[j][i]=x; private javax.swing.JLabel
x++; jLabelMatriz2;
} private javax.swing.JPanel jPanel1;
} private javax.swing.JScrollPane
if(n%2==1){ jScrollPane1;
matriz[n/2+1][n/2+1]=x; private javax.swing.JScrollPane
} jScrollPane2;
return matriz;} private javax.swing.JScrollPane
jScrollPane3;
// Variables declaration - do not private javax.swing.JTable jTable1;
modify private javax.swing.JTable jTable2;
private javax.swing.JButton jButton1; private javax.swing.JTable jTable3;
private javax.swing.JButton jButton2; private javax.swing.JTextField
private javax.swing.JButton jButton3; jTextFieldColumnaSM;
private javax.swing.JButton jButton4; private javax.swing.JTextField
private javax.swing.JButton jTextFieldColumnasPM;
jButtonEspiral; private javax.swing.JTextField
private javax.swing.JButton jTextFieldFilasPM;
jButtonGenerar; private javax.swing.JTextField
private javax.swing.JButton jTextFieldFilasSM;
jButtonMultiplicacion; // End of variables declaration
private javax.swing.JButton }
jButtonResta;
Interfaz Gráfica
IngresarDatosTipos
Codificación

/* public static String filas="" ;


* To change this license header, public static String columnas="";
choose License Headers in Project
@SuppressWarnings("unchecked")
Properties.
// <editor-fold
* To change this template file, choose
defaultstate="collapsed"
Tools | Templates
desc="Generated Code">
* and open the template in the editor.
private void initComponents() {
*/
package Interfaz;
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
import java.awt.HeadlessException;
jButton1 = new
import javax.swing.JOptionPane; javax.swing.JButton();
txtFila = new
javax.swing.JTextField();
/**
txtColumna = new
*
javax.swing.JTextField();
* @author USUARIO
jButton2 = new
*/ javax.swing.JButton();

public class IngresarDatosTipos extends jLabel1 = new javax.swing.JLabel();


javax.swing.JFrame {

/** setDefaultCloseOperation(javax.swing.
WindowConstants.EXIT_ON_CLOSE);
* Creates new form
IngresarDatosTipos setUndecorated(true);

*/ getContentPane().setLayout(new
org.netbeans.lib.awtextra.AbsoluteLayo
public IngresarDatosTipos() {
ut());
initComponents();
this.setLocationRelativeTo(null);
jLabel2.setFont(new
java.awt.Font("Dialog", 0, 24)); //
NOI18N
}
jLabel2.setText("Filas"); });
getContentPane().add(jLabel2, new getContentPane().add(txtFila, new
org.netbeans.lib.awtextra.AbsoluteCon org.netbeans.lib.awtextra.AbsoluteCon
straints(50, 40, 110, 20)); straints(290, 40, 100, -1));

jLabel3.setFont(new txtColumna.addActionListener(new
java.awt.Font("Dialog", 0, 24)); // java.awt.event.ActionListener() {
NOI18N
public void
jLabel3.setText("Columnas"); actionPerformed(java.awt.event.Action
Event evt) {
getContentPane().add(jLabel3, new
org.netbeans.lib.awtextra.AbsoluteCon
straints(50, 100, 110, 20)); txtColumnaActionPerformed(evt);
}
jButton1.setText("Ir"); });
jButton1.addActionListener(new getContentPane().add(txtColumna,
java.awt.event.ActionListener() { new
org.netbeans.lib.awtextra.AbsoluteCon
public void
straints(290, 90, 100, -1));
actionPerformed(java.awt.event.Action
Event evt) {
jButton2.setText("Volver");
jButton1ActionPerformed(evt);
jButton2.addActionListener(new
} java.awt.event.ActionListener() {
}); public void
actionPerformed(java.awt.event.Action
getContentPane().add(jButton1,
Event evt) {
new
org.netbeans.lib.awtextra.AbsoluteCon
straints(160, 160, 150, -1)); jButton2ActionPerformed(evt);
}
txtFila.addActionListener(new });
java.awt.event.ActionListener() {
getContentPane().add(jButton2,
public void new
actionPerformed(java.awt.event.Action org.netbeans.lib.awtextra.AbsoluteCon
Event evt) { straints(160, 200, 150, -1));
txtFilaActionPerformed(evt);
}
jLabel1.setIcon(new ventana.setVisible(true);
javax.swing.ImageIcon(getClass().getRe
this.setVisible(false);}
source("/Imagenees/luz-de-fondo-
mariposas-flores- }else{
azules_2003581210.jpg"))); // NOI18N
getContentPane().add(jLabel1, new JOptionPane.showMessageDialog(null,"
org.netbeans.lib.awtextra.AbsoluteCon Ingrese datos mayores a cero");
straints(0, 0, 440, 260));
}
}catch(java.lang.NumberFormatExc
pack(); eption e){
}// </editor-fold>
JOptionPane.showMessageDialog(null,"
Disculpa pero no se permite letras o
private void espacios en blanco\nAsegúrese de que
jButton1ActionPerformed(java.awt.eve estén todos los valores\nError: "+e);
nt.ActionEvent evt) {
}catch(HeadlessException e){
int f=0,c=0;
JOptionPane.showMessageDialog(null,"
Se produjo un error inesperado"+e);
try{
}
filas=txtFila.getText();//guardamos lo
que el usuario ingresó
columnas =
txtColumna.getText();
}
f=Integer.parseInt(filas);
c=Integer.parseInt(columnas);
private void
if(f>0&c>0){
txtFilaActionPerformed(java.awt.event.
if(f>100||c>100){ ActionEvent evt) {

JOptionPane.showMessageDialog(null,"
}
Ingrese datos con números mas
pequeños");
}else{ private void
txtColumnaActionPerformed(java.awt.e
Mostrar ventana = new
vent.ActionEvent evt) {
Mostrar();
// TODO add your handling code if
here: ("Nimbus".equals(info.getName())) {
}
javax.swing.UIManager.setLookAndFeel
(info.getClassName());
private void
break;
jButton2ActionPerformed(java.awt.eve
nt.ActionEvent evt) { }
Matriz ventana = new Matriz(); }
ventana.setVisible(true); } catch (ClassNotFoundException
ex) {
this.setVisible(false);
}
java.util.logging.Logger.getLogger(Ingre
sarDatosTipos.class.getName()).log(java
.util.logging.Level.SEVERE, null, ex);
/**
} catch (InstantiationException ex) {
* @param args the command line
arguments
java.util.logging.Logger.getLogger(Ingre
*/
sarDatosTipos.class.getName()).log(java
public static void main(String args[]) { .util.logging.Level.SEVERE, null, ex);

/* Set the Nimbus look and feel */ } catch (IllegalAccessException ex) {

//<editor-fold
defaultstate="collapsed" desc=" Look java.util.logging.Logger.getLogger(Ingre
and feel setting code (optional) "> sarDatosTipos.class.getName()).log(java
.util.logging.Level.SEVERE, null, ex);
/* If Nimbus (introduced in Java SE
6) is not available, stay with the default } catch
look and feel. (javax.swing.UnsupportedLookAndFeel
Exception ex) {
* For details see
http://download.oracle.com/javase/tut
orial/uiswing/lookandfeel/plaf.html java.util.logging.Logger.getLogger(Ingre
sarDatosTipos.class.getName()).log(java
*/
.util.logging.Level.SEVERE, null, ex);
try {
}
for
//</editor-fold>
(javax.swing.UIManager.LookAndFeelIn
fo info :
javax.swing.UIManager.getInstalledLoo
/* Create and display the form */
kAndFeels()) {
private javax.swing.JButton jButton1;
java.awt.EventQueue.invokeLater(new
private javax.swing.JButton jButton2;
Runnable() {
private javax.swing.JLabel jLabel1;
public void run() {
private javax.swing.JLabel jLabel2;
new
IngresarDatosTipos().setVisible(true); private javax.swing.JLabel jLabel3;
} private javax.swing.JTextField
txtColumna;
});
private javax.swing.JTextField txtFila;
}
// End of variables declaration
}
// Variables declaration - do not
modify

Interfaz Gráfica
Int
Codificación

/* jPanel1 = new javax.swing.JPanel();


* To change this license header, jLabel1 = new javax.swing.JLabel();
choose License Headers in Project jLabel2 = new javax.swing.JLabel();
Properties. jLabel3 = new javax.swing.JLabel();
* To change this template file, choose jLabel4 = new javax.swing.JLabel();
Tools | Templates jLabel5 = new javax.swing.JLabel();
* and open the template in the editor. jButton1 = new
*/ javax.swing.JButton();
package Interfaz;

/** setDefaultCloseOperation(javax.swing.
* WindowConstants.EXIT_ON_CLOSE);
* @author USUARIO setUndecorated(true);
*/
public class Int extends jPanel1.setBackground(new
javax.swing.JFrame { java.awt.Color(204, 204, 255));

/** jLabel1.setBackground(new
* Creates new form Int java.awt.Color(0, 0, 0));
*/ jLabel1.setFont(new
public Int() { java.awt.Font("Dialog", 0, 36)); //
initComponents(); NOI18N
this.setLocationRelativeTo(null); jLabel1.setForeground(new
} java.awt.Color(0, 0, 51));
jLabel1.setText("Integrantes");
/**
* This method is called from within jLabel2.setFont(new
the constructor to initialize the form. java.awt.Font("Leelawadee", 2, 18)); //
* WARNING: Do NOT modify this NOI18N
code. The content of this method is jLabel2.setForeground(new
always java.awt.Color(0, 0, 153));
* regenerated by the Form Editor. jLabel2.setText("• De La Calle Coz
*/ Carlos Daniel");
@SuppressWarnings("unchecked")
// <editor-fold jLabel3.setFont(new
defaultstate="collapsed" java.awt.Font("Leelawadee", 2, 18)); //
desc="Generated Code"> NOI18N
private void initComponents() { jLabel3.setForeground(new
java.awt.Color(0, 0, 153));
jLabel3.setText("• Soto Pacheco .addContainerGap(64,
Eliana"); Short.MAX_VALUE)
.addGroup(jPanel1Layout.crea
jLabel4.setFont(new teParallelGroup(javax.swing.GroupLayo
java.awt.Font("Leelawadee", 2, 18)); // ut.Alignment.TRAILING)
NOI18N .addComponent(jLabel5,
jLabel4.setForeground(new javax.swing.GroupLayout.PREFERRED_S
java.awt.Color(0, 0, 153)); IZE, 274,
jLabel4.setText("• Suarez Torres D. javax.swing.GroupLayout.PREFERRED_S
Ruth"); IZE)
.addComponent(jLabel4,
jLabel5.setFont(new javax.swing.GroupLayout.PREFERRED_S
java.awt.Font("Leelawadee", 2, 18)); // IZE, 274,
NOI18N javax.swing.GroupLayout.PREFERRED_S
jLabel5.setForeground(new IZE)
java.awt.Color(0, 0, 153)); .addGroup(jPanel1Layout.cr
jLabel5.setText("• Valencia Lopez eateParallelGroup(javax.swing.GroupLa
Juan Carlos"); yout.Alignment.LEADING, false)
.addComponent(jLabel2,
jButton1.setBackground(new javax.swing.GroupLayout.DEFAULT_SIZ
java.awt.Color(153, 0, 0)); E, 274, Short.MAX_VALUE)
jButton1.setText("OK"); .addComponent(jLabel3,
jButton1.addActionListener(new javax.swing.GroupLayout.DEFAULT_SIZ
java.awt.event.ActionListener() { E,
public void javax.swing.GroupLayout.DEFAULT_SIZ
actionPerformed(java.awt.event.Action E, Short.MAX_VALUE)))
Event evt) { .addContainerGap(64,
Short.MAX_VALUE))
jButton1ActionPerformed(evt); .addGroup(javax.swing.GroupLay
} out.Alignment.TRAILING,
}); jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing
javax.swing.GroupLayout .GroupLayout.DEFAULT_SIZE,
jPanel1Layout = new Short.MAX_VALUE)
javax.swing.GroupLayout(jPanel1); .addComponent(jButton1,
jPanel1.setLayout(jPanel1Layout); javax.swing.GroupLayout.PREFERRED_S
jPanel1Layout.setHorizontalGroup( IZE, 88,
javax.swing.GroupLayout.PREFERRED_S
jPanel1Layout.createParallelGroup(java IZE)
x.swing.GroupLayout.Alignment.LEADI .addContainerGap())
NG) .addGroup(jPanel1Layout.create
.addGroup(jPanel1Layout.create SequentialGroup()
SequentialGroup() .addGap(121, 121, 121)
.addComponent(jLabel1)
.addContainerGap(javax.swing AILING,
.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZ
Short.MAX_VALUE)) E,
); javax.swing.GroupLayout.DEFAULT_SIZ
jPanel1Layout.setVerticalGroup( E, Short.MAX_VALUE)
);
jPanel1Layout.createParallelGroup(java layout.setVerticalGroup(
x.swing.GroupLayout.Alignment.LEADI
NG) layout.createParallelGroup(javax.swing.
.addGroup(jPanel1Layout.create GroupLayout.Alignment.LEADING)
SequentialGroup() .addComponent(jPanel1,
.addContainerGap() javax.swing.GroupLayout.Alignment.TR
.addComponent(jLabel1) AILING,
.addGap(18, 18, 18) javax.swing.GroupLayout.DEFAULT_SIZ
.addComponent(jLabel2) E,
.addGap(29, 29, 29) javax.swing.GroupLayout.DEFAULT_SIZ
.addComponent(jLabel3) E, Short.MAX_VALUE)
.addGap(29, 29, 29) );
.addComponent(jLabel4)
.addGap(36, 36, 36) pack();
.addComponent(jLabel5) }// </editor-fold>
.addPreferredGap(javax.swing.
LayoutStyle.ComponentPlacement.REL private void
ATED, 43, Short.MAX_VALUE) jButton1ActionPerformed(java.awt.eve
.addComponent(jButton1, nt.ActionEvent evt) {
javax.swing.GroupLayout.PREFERRED_S System.exit(0);
IZE, 39, }
javax.swing.GroupLayout.PREFERRED_S
IZE) /**
.addContainerGap()) * @param args the command line
); arguments
*/
javax.swing.GroupLayout layout = public static void main(String args[]) {
new /* Set the Nimbus look and feel */
javax.swing.GroupLayout(getContentPa //<editor-fold
ne()); defaultstate="collapsed" desc=" Look
and feel setting code (optional) ">
getContentPane().setLayout(layout); /* If Nimbus (introduced in Java SE
layout.setHorizontalGroup( 6) is not available, stay with the default
look and feel.
layout.createParallelGroup(javax.swing. * For details see
GroupLayout.Alignment.LEADING) http://download.oracle.com/javase/tut
.addComponent(jPanel1, orial/uiswing/lookandfeel/plaf.html
javax.swing.GroupLayout.Alignment.TR */
try { } catch
for (javax.swing.UnsupportedLookAndFeel
(javax.swing.UIManager.LookAndFeelIn Exception ex) {
fo info :
javax.swing.UIManager.getInstalledLoo java.util.logging.Logger.getLogger(Int.cl
kAndFeels()) { ass.getName()).log(java.util.logging.Lev
if el.SEVERE, null, ex);
("Nimbus".equals(info.getName())) { }
//</editor-fold>
javax.swing.UIManager.setLookAndFeel
(info.getClassName()); /* Create and display the form */
break;
} java.awt.EventQueue.invokeLater(new
} Runnable() {
} catch (ClassNotFoundException public void run() {
ex) { new Int().setVisible(true);
}
java.util.logging.Logger.getLogger(Int.cl });
ass.getName()).log(java.util.logging.Lev }
el.SEVERE, null, ex);
} catch (InstantiationException ex) { // Variables declaration - do not
modify
java.util.logging.Logger.getLogger(Int.cl private javax.swing.JButton jButton1;
ass.getName()).log(java.util.logging.Lev private javax.swing.JLabel jLabel1;
el.SEVERE, null, ex); private javax.swing.JLabel jLabel2;
} catch (IllegalAccessException ex) { private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
java.util.logging.Logger.getLogger(Int.cl private javax.swing.JLabel jLabel5;
ass.getName()).log(java.util.logging.Lev private javax.swing.JPanel jPanel1;
el.SEVERE, null, ex); // End of variables declaration
}
Interfaz Gráfica
Matriz (JFrame Form Principal)
Codificación
* This method is called from within
/* the constructor to initialize the form.
* To change this license header, * WARNING: Do NOT modify this
choose License Headers in Project code. The content of this method is
Properties. always
* To change this template file, choose * regenerated by the Form Editor.
Tools | Templates
*/
* and open the template in the editor.
@SuppressWarnings("unchecked")
*/
// <editor-fold
package Interfaz; defaultstate="collapsed"
desc="Generated Code">
private void initComponents() {

jLabel2 = new javax.swing.JLabel();


/**
ButtonSalir = new
*
javax.swing.JButton();
* @author USUARIO
ButtonTipos = new
*/ javax.swing.JButton();

public class Matriz extends ButtonPropiedades = new


javax.swing.JFrame { javax.swing.JButton();
jLabel1 = new javax.swing.JLabel();

/**
* Creates new form IngresarDatos
setDefaultCloseOperation(javax.swing.
*/
WindowConstants.EXIT_ON_CLOSE);
public Matriz() {
setUndecorated(true);
initComponents();
getContentPane().setLayout(new
this.setLocationRelativeTo(null); org.netbeans.lib.awtextra.AbsoluteLayo
ut());
}

jLabel2.setBackground(new
/**
java.awt.Color(255, 255, 255));
jLabel2.setFont(new
java.awt.Font("Dialog", 0, 18)); // ButtonTipos.addActionListener(new
NOI18N java.awt.event.ActionListener() {
jLabel2.setForeground(new public void
java.awt.Color(51, 255, 255)); actionPerformed(java.awt.event.Action
Event evt) {
jLabel2.setText("MATRICES");
getContentPane().add(jLabel2, new
ButtonTiposActionPerformed(evt);
org.netbeans.lib.awtextra.AbsoluteCon
straints(130, 20, -1, -1)); }
});
ButtonSalir.setBackground(new
java.awt.Color(102, 0, 0)); getContentPane().add(ButtonTipos,
new
ButtonSalir.setForeground(new
org.netbeans.lib.awtextra.AbsoluteCon
java.awt.Color(204, 204, 255));
straints(60, 80, 230, 40));
ButtonSalir.setText("EXIT");
ButtonSalir.addActionListener(new
ButtonPropiedades.setFont(new
java.awt.event.ActionListener() {
java.awt.Font("Nirmala UI", 1, 14)); //
public void NOI18N
actionPerformed(java.awt.event.Action
Event evt) {
ButtonPropiedades.setText("Propiedad
es de matrices");
ButtonSalirActionPerformed(evt);
} ButtonPropiedades.addActionListener(
new java.awt.event.ActionListener() {
});
public void
getContentPane().add(ButtonSalir,
actionPerformed(java.awt.event.Action
new
Event evt) {
org.netbeans.lib.awtextra.AbsoluteCon
straints(150, 240, -1, -1));
ButtonPropiedadesActionPerformed(ev
t);
ButtonTipos.setFont(new
}
java.awt.Font("Nirmala UI", 1, 14)); //
NOI18N });

ButtonTipos.setText("Tipos de
Matrices"); getContentPane().add(ButtonPropieda
des, new
org.netbeans.lib.awtextra.AbsoluteCon private void
straints(60, 150, 230, 40)); ButtonPropiedadesActionPerformed(ja
va.awt.event.ActionEvent evt) {
IngresarDatosPropiedades
jLabel1.setIcon(new
IngrProp = new
javax.swing.ImageIcon(getClass().getRe
IngresarDatosPropiedades();
source("/Imagenees/3905a73201a5bed
f4fe1bd949977f206.jpg"))); // NOI18N IngrProp.setVisible(true);
jLabel1.setText("jLabel1"); this.setVisible(false);
getContentPane().add(jLabel1, new }
org.netbeans.lib.awtextra.AbsoluteCon
straints(0, 0, 340, 300));
/**
* @param args the command line
pack();
arguments
}// </editor-fold>
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
private void
//<editor-fold
ButtonSalirActionPerformed(java.awt.e
defaultstate="collapsed" desc=" Look
vent.ActionEvent evt) {
and feel setting code (optional) ">
System.exit(0);
/* If Nimbus (introduced in Java SE
6) is not available, stay with the default
look and feel.
}
* For details see
http://download.oracle.com/javase/tut
private void orial/uiswing/lookandfeel/plaf.html
ButtonTiposActionPerformed(java.awt.
*/
event.ActionEvent evt) {
try {
IngresarDatosTipos Ingrdat = new
IngresarDatosTipos(); for
(javax.swing.UIManager.LookAndFeelIn
Ingrdat.setVisible(true);
fo info :
this.setVisible(false); javax.swing.UIManager.getInstalledLoo
kAndFeels()) {
}
if
("Nimbus".equals(info.getName())) {
//</editor-fold>
javax.swing.UIManager.setLookAndFeel
//</editor-fold>
(info.getClassName());
break;
/* Create and display the form */
}
}
java.awt.EventQueue.invokeLater(new
} catch (ClassNotFoundException Runnable() {
ex) {
public void run() {
new Matriz().setVisible(true);
java.util.logging.Logger.getLogger(Matri
z.class.getName()).log(java.util.logging. }
Level.SEVERE, null, ex);
});
} catch (InstantiationException ex) {

java.util.logging.Logger.getLogger(Matri
z.class.getName()).log(java.util.logging. }
Level.SEVERE, null, ex);
// Variables declaration - do not
} catch (IllegalAccessException ex) { modify
private javax.swing.JButton
java.util.logging.Logger.getLogger(Matri ButtonPropiedades;
z.class.getName()).log(java.util.logging.
private javax.swing.JButton
Level.SEVERE, null, ex);
ButtonSalir;
} catch
private javax.swing.JButton
(javax.swing.UnsupportedLookAndFeel
ButtonTipos;
Exception ex) {
private javax.swing.JLabel jLabel1;
java.util.logging.Logger.getLogger(Matri private javax.swing.JLabel jLabel2;
z.class.getName()).log(java.util.logging.
// End of variables declaration
Level.SEVERE, null, ex);
}
}
Interfaz Gráfica
Mostrar
Codificación
//IngresarDatosTipos Ingrdat =
/* new IngresarDatosTipos();

* To change this license header, Filas=IngresarDatosTipos.filas;


choose License Headers in Project Columnas =
Properties. IngresarDatosTipos.columnas;
* To change this template file, choose }
Tools | Templates
* and open the template in the editor.
/**
*/
* This method is called from within
package Interfaz; the constructor to initialize the form.
* WARNING: Do NOT modify this
import code. The content of this method is
java.util.InputMismatchException; always

import javax.swing.JOptionPane; * regenerated by the Form Editor.

import */
javax.swing.table.DefaultTableModel; @SuppressWarnings("unchecked")
// <editor-fold
/** defaultstate="collapsed"
desc="Generated Code">
*
private void initComponents() {
* @author USUARIO
*/
jScrollPane4 = new
public class Mostrar extends javax.swing.JScrollPane();
javax.swing.JFrame {
textAreaTipos = new
javax.swing.JTextArea();
/** jScrollPane1 = new
* Creates new form Mostrar javax.swing.JScrollPane();

*/String Filas; String Columnas; TablaMatriz = new


javax.swing.JTable();
public Mostrar() {
ButtonMostrarMatriz = new
initComponents(); javax.swing.JButton();
this.setLocationRelativeTo(null);
jButton2 = new
javax.swing.JButton();
jButton1 = new ButtonMostrarMatriz.setText("Ingresar
javax.swing.JButton(); Datos");
jButton3 = new
javax.swing.JButton(); ButtonMostrarMatriz.addActionListene
r(new java.awt.event.ActionListener() {
public void
actionPerformed(java.awt.event.Action
setDefaultCloseOperation(javax.swing.
Event evt) {
WindowConstants.EXIT_ON_CLOSE);
setUndecorated(true);
ButtonMostrarMatrizActionPerformed(
evt);

textAreaTipos.setColumns(20); }

textAreaTipos.setRows(5); });

textAreaTipos.setCaretColor(new
java.awt.Color(204, 0, 204));
jButton2.setText("Exit");
textAreaTipos.setEnabled(false);
jButton2.addActionListener(new
java.awt.event.ActionListener() {
jScrollPane4.setViewportView(textArea
public void
Tipos);
actionPerformed(java.awt.event.Action
Event evt) {

TablaMatriz.setModel(new
javax.swing.table.DefaultTableModel( jButton2ActionPerformed(evt);

new Object [][] { }


});

},
new String [] { jButton1.setText("Volver");
jButton1.addActionListener(new
java.awt.event.ActionListener() {
}
public void
));
actionPerformed(java.awt.event.Action
Event evt) {
jScrollPane1.setViewportView(TablaMa
triz);
jButton1ActionPerformed(evt);
} .addGroup(layout.createP
arallelGroup(javax.swing.GroupLayout.
});
Alignment.LEADING)
.addComponent(Button
jButton3.setText("Volver al Menu MostrarMatriz,
Principal"); javax.swing.GroupLayout.DEFAULT_SIZ
E, 164, Short.MAX_VALUE)
jButton3.addActionListener(new
java.awt.event.ActionListener() { .addComponent(jButto
n2,
public void
javax.swing.GroupLayout.DEFAULT_SIZ
actionPerformed(java.awt.event.Action
E,
Event evt) {
javax.swing.GroupLayout.DEFAULT_SIZ
E, Short.MAX_VALUE)
jButton3ActionPerformed(evt);
.addComponent(jButto
} n1,
javax.swing.GroupLayout.DEFAULT_SIZ
});
E,
javax.swing.GroupLayout.DEFAULT_SIZ
E, Short.MAX_VALUE)
javax.swing.GroupLayout layout =
new .addComponent(jButto
javax.swing.GroupLayout(getContentPa n3,
ne()); javax.swing.GroupLayout.DEFAULT_SIZ
E,
javax.swing.GroupLayout.DEFAULT_SIZ
getContentPane().setLayout(layout);
E, Short.MAX_VALUE))
layout.setHorizontalGroup(
.addGap(18, 18, 18)
.addComponent(jScrollPa
layout.createParallelGroup(javax.swing.
ne1,
GroupLayout.Alignment.LEADING)
javax.swing.GroupLayout.PREFERRED_S
.addGroup(layout.createSequent IZE, 341,
ialGroup() javax.swing.GroupLayout.PREFERRED_S
IZE))
.addGap(20, 20, 20)
.addComponent(jScrollPane
.addGroup(layout.createParall
4))
elGroup(javax.swing.GroupLayout.Align
ment.LEADING) .addContainerGap())

.addGroup(layout.createSeq );
uentialGroup()
layout.setVerticalGroup(
.addPreferredGap(javax.swing.
layout.createParallelGroup(javax.swing. LayoutStyle.ComponentPlacement.UNR
GroupLayout.Alignment.LEADING) ELATED)
.addGroup(layout.createSequent .addComponent(jScrollPane4,
ialGroup() javax.swing.GroupLayout.DEFAULT_SIZ
E, 312, Short.MAX_VALUE)
.addGroup(layout.createParall
elGroup(javax.swing.GroupLayout.Align .addContainerGap())
ment.LEADING, false)
);
.addGroup(layout.createSeq
uentialGroup()
pack();
.addContainerGap()
}// </editor-fold>
.addComponent(jScrollPa
ne1,
javax.swing.GroupLayout.PREFERRED_S
private void
IZE, 135,
ButtonMostrarMatrizActionPerformed(
javax.swing.GroupLayout.PREFERRED_S
java.awt.event.ActionEvent evt) {
IZE))
try{
.addGroup(layout.createSeq
uentialGroup() int fila =
Integer.parseInt(IngresarDatosTipos.fila
.addGap(26, 26, 26)
s);
.addComponent(ButtonM
int columna =
ostrarMatriz)
Integer.parseInt(IngresarDatosTipos.col
.addPreferredGap(javax.s umnas);
wing.LayoutStyle.ComponentPlacemen
int [][] matriz = new
t.RELATED)
int[fila][columna];
.addComponent(jButton1)
.addPreferredGap(javax.s
matriz = this.IngresarMatriz();
wing.LayoutStyle.ComponentPlacemen
t.RELATED) this.MostrarMatriz(matriz, fila,
columna);
.addComponent(jButton3)
}catch(java.lang.NumberFormatExc
.addPreferredGap(javax.s
eption e){
wing.LayoutStyle.ComponentPlacemen
t.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZ JOptionPane.showMessageDialog(null,"
E, Short.MAX_VALUE) Compiló desde otra clase");
.addComponent(jButton2) }
))
public static void main(String args[]) {
} /* Set the Nimbus look and feel */
//<editor-fold
defaultstate="collapsed" desc=" Look
private void
and feel setting code (optional) ">
jButton2ActionPerformed(java.awt.eve
nt.ActionEvent evt) { /* If Nimbus (introduced in Java SE
6) is not available, stay with the default
Int traer = new Int();
look and feel.
traer.setVisible(true);
* For details see
this.setVisible(false); http://download.oracle.com/javase/tut
orial/uiswing/lookandfeel/plaf.html
}
*/
try {
private void
jButton1ActionPerformed(java.awt.eve for
nt.ActionEvent evt) { (javax.swing.UIManager.LookAndFeelIn
fo info :
IngresarDatosTipos abrir = new
javax.swing.UIManager.getInstalledLoo
IngresarDatosTipos();
kAndFeels()) {
abrir.setVisible(true);
if
this.setVisible(false); ("Nimbus".equals(info.getName())) {

}
javax.swing.UIManager.setLookAndFeel
(info.getClassName());
private void
break;
jButton3ActionPerformed(java.awt.eve
nt.ActionEvent evt) { }

Matriz abrir = new Matriz(); }

abrir.setVisible(true); } catch (ClassNotFoundException


ex) {
this.setVisible(false);
}
java.util.logging.Logger.getLogger(Most
rar.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
/**
} catch (InstantiationException ex) {
* @param args the command line
arguments
java.util.logging.Logger.getLogger(Most
*/
rar.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex); model.setRowCount(fila);//Establecer
cantidad de columnas
} catch (IllegalAccessException ex) {

model.setColumnCount(columna);//Est
java.util.logging.Logger.getLogger(Most
ablecer cantidad de columnas
rar.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex); for (int i = 0; i < fila; i++) {
} catch for (int j = 0; j < columna; j++) {
(javax.swing.UnsupportedLookAndFeel
Exception ex) {
TablaMatriz.setValueAt(Matriz[i][j], i,
j);//(Matriz[i][j], i establece la posicion
java.util.logging.Logger.getLogger(Most en fila que se mostrara ,
rar.class.getName()).log(java.util.loggin
g.Level.SEVERE, null, ex);
//j establece la posicion de columna
} que se mostrara)
//</editor-fold> }

/* Create and display the form */ }


}
java.awt.EventQueue.invokeLater(new
public int[][] IngresarMatriz(){
Runnable() {
int Fila = Integer.parseInt(Filas);
public void run() {
int Columna =
new Mostrar().setVisible(true);
Integer.parseInt(Columnas);
}
int [][] Matriz = new
}); int[Fila][Columna];

}
public void MostrarMatriz(int
Matriz[][],int fila,int columna){
for (int i = 0; i <Fila; i++) {
DefaultTableModel model =
(DefaultTableModel)
TablaMatriz.getModel();//podemos for (int j = 0; j < Columna; j++) {
modificar la cantidadd de filas y
String SNum="";
columnas
int INum = 0;
int error = 0; }/}while(error = false);*/
do{ int rptaMatriz[][]=new
int[Fila][Columna];
try{
int resultado=0;int cont1 =0;
SNum=(JOptionPane.showInputDialog(" String
Ingrese el valor: "+(i+1)+","+(j+1)+"")); RFila,RColumna,Rrectangular,Rcuadrad
a,Rnula , Rsuperior , Rinferior
INum =
Integer.parseInt(SNum); ,Rdiagonal, Ridentidad,
Ridempotente,Rsimetrica ,Rortogonal,
Matriz[i][j]=INum;
Rinvolutiva,
error = 0;
Rantisimetrica,Rnilpotente;
}catch(InputMismatchExc
//Matriz Fila
eption |
java.lang.NumberFormatException e){ if(Fila == 1){
error = 1; RFila="✓✓✓\t FILA,porque
esta constituido por una sola fila. Es de
dimension 1xn.";
JOptionPane.showMessageDialog(this,
"Lo siento has introducido letras"); }
else{
} RFila=("!!!\t NO ES MATRIZ
FILA, porque no está constituida por
}while(error== 1); }}
una sola fila. Es de dimension mxn,
/* }catch(InputMismatchException siendo n!=1");
e){
}
error = true;
//Matriz Columna
if(Columna ==1){
JOptionPane.showMessageDialog(this,
"Lo siento has introducido letras"); RColumna=("✓✓✓\t
COLUMNA,por que esta constituido por
una sola columna ");
}catch(Exception e){
}else{
error = true;
RColumna=("!!!\t
NO ES COLUMNA, porque no esta
JOptionPane.showMessageDialog(this, constituidad por una sola columna");
"Se ha producido un error
inesperado");
} }
//Matriz rectangular else{
if(Columna!=Fila){ Rnula=("!!!\t NO Es Nula");

Rrectangular=("✓✓✓\t }
RECTANGULAR, por ");
//Matriz triangular superior
}
int matsup = 0, matinf = 0;
else{
if (Fila == Columna){
Rrectangular=("!!!\t NO ES
for (int i = 0; i <
RECTANGULAR, porque la cantidad de
Matriz.length; i++) {
filas no es igual a la de columna, no es
de dimension mxn."); for (int j = 0; j <
Matriz[0].length; j++) {
}
if
//Matriz Cuadrada
((i>j)&&(Matriz[i][j]==0)) {
if(Columna == Fila){
matsup ++;
Rcuadrada=("✓✓✓\t }
CUADRADA");
//Matriz triangular
} inferior
else{ if
Rcuadrada=("!!!\t No es ((i<j)&&(Matriz[i][j]==0)) {
Cuadrada, porque no tiene el mismo matinf ++;
numero de filas y columnas "); }
}
//Matriz nula
}
int nul=0;
}
for (int[] Matriz1 : Matriz) {
if (matinf==(Fila-1)*(Fila)/2) {
for (int j = 0; j<Matriz.length;
j++) { Rinferior=("✓✓✓\t
Triangular Inferior");
nul += Matriz1[j];
}else{
}
Rinferior=("!!!\t No Es
}
Triangular Inferior");
if (nul==0){
}
//
if (matsup==(Fila-1)*(Fila)/2)
Rnula=("✓✓✓\t Es Nula"); {
Rsuperior=("✓✓✓\t Rdiagonal=("✓✓✓\t Es una
Triangular Superior"); matriz diagonal");
}else{ }else{
Rsuperior=("!!!\t No Es Rdiagonal=("!!!\t No es
Triangular Superior"); una matriz diagonal");
} }
}else{ }else{
Rinferior=("!!!\t No Es Rdiagonal=("!!!\t No es
Triangular Inferior"); Cuadrada, Por lo tanto No puede ser
diagonal");
Rsuperior=("!!!\t No Es
Triangular Superior"); }
} //Matriz identidad o unidad
//Matriz Diagonal
if(Matriz.length==Matriz[0].length){
int escalar1 = 0;
int sumdiag = 0;
int escalar2 = 0;
int sumelem = 0;
if(Matriz.length==Matriz[0].length){ for (int i = 0 ; i <
Matriz.length;i++){
for(int
i=0;i<Matriz.length;i++){ for (int j=
0;j<Matriz.length;j++){
for(int
j=0;j<Matriz[0].length;j++){
if((i==j)&&(Matriz[i][j]==1)){
if(i==j&&Matriz[i][j]!=0){
sumelem++;
escalar1++;
}
}
if
if(j!=i&&Matriz[i][j]==0){
((i!=j)&&(Matriz[i][j])==0){
escalar2++;
sumdiag++;
}
}
}
}
}
}
if(escalar2==((Matriz.length-
if ((sumdiag==(Fila-
1)*Matriz[0].length)&escalar1==((Matri
1)*Fila)&&(sumelem==Fila)){
z.length-1)*Matriz[0].length)/2){
Ridentidad=("✓✓✓\t Es
Identidad o unidad"); resultado=resultado+aux[k]*aux2[k];

}else{ rptaMatriz[ i ][j ] +=


Matriz[i][k]*Matriz[k][j];
Ridentidad=("!!!\t No es
identidad o unidad"); }

}
if(resultado==Matriz[i][j]){
}else{
contador++;
Ridentidad=("!!!\t No es
identidad o unidad"); }

} //analizamos la matriz
para comprobar si es ortogonal :
int contador = 0;int simetrica =
0 , antisimetrica = 0 ,ortogonal=0, //Ortogonal
involutiva=0, nilpotente=0;
if(i==j){
if(resultado==1){
if(Matriz.length==Matriz[0].length){
ortogonal++;
//creamos dos arreglos como
auxiliares }

//estos serviran para }if (i!=j) {


almacenar valores temporalmente
if (resultado ==0) {
int [] aux;
cont1++;
int [] aux2;
}
//analizamos la matriz para
}
comprobar si es idempotente :
//analizamos la matriz
for(int i=0;i<Fila;i++){
para comprobar si es involutiva :
for(int j=0;j<Columna;j++){
if(i==j){
aux= new int [Fila];
if(resultado==1){
aux2= new int
involutiva++;
[Columna];
}
for(int k=0;k<Fila;k++){
}
aux[k]=Matriz[i][k];
if(resultado == 0){
aux2[k]=Matriz[k][j];
nilpotente++;
//realizamos la suma
de la multiplicación }
//se asigna el valor de
resultado a 0 System.out.printf("%3d", Matriz[i][j]);
//para realizar los }
siguiente bucles
System.out.printf("\t");
resultado=0;
for (int j = 0; j <
} Matriz.length; j++)
} {
if(contador==Fila*Columna){ if ( i <= (Columna - 1))

Ridempotente=("✓✓✓\t
Es una matriz idempotente"); System.out.printf("%3d", Matriz[i][j]);

for (int i = 0; i < Columna; System.out.printf(" ");


i++ )
}
{ /* abre for que controla
System.out.printf ("\t --
numero de renglones
>");
Este ciclo imprime la
for ( int j = 0; j <
primera matriz
Matriz.length; j++ )
No hay ningun
{
problema para imprimir la primera
matriz, ya que se
System.out.printf("%3d",
trata de un par de ciclos
rptaMatriz[i][j]);
for. Sin embargo se quiere imprimir las
}
tres matrices, lo cual
hace un poquito mas complicado el System.out.printf("\n");
asunto.
}
De todas formas la
}
primera se imprime renglon por
renglon else{

solo que antes de pasar Ridempotente=("!!!\t No


al siguiente renglon, se escriben las es una matriz idempotente");
entradas
}
correspondientes de la
if(involutiva==Fila){
segunda y tercera matrices.*/
Rinvolutiva=("✓✓✓\t Es
for (int j = 0; j< Fila; j++)
una matriz involutiva");
{
for (int i = 0; i < Columna;
i++ )
{ Rortogonal=("✓✓✓\t Es
una matriz ortogonal");
for (int j = 0; j< Fila; j++)
for (int i = 0; i < Columna;
{
i++ ){
for (int j = 0; j< Fila;
System.out.printf("%3d", Matriz[i][j]);
j++){
}
System.out.printf("\t"); System.out.printf("%3d", Matriz[i][j]);
for (int j = 0; j < }
Matriz.length; j++){
System.out.printf("\t");
if ( i <= (Columna - 1))
for (int j = 0; j <
Matriz.length; j++){
System.out.printf("%3d", Matriz[i][j]);
if ( i <= (Columna - 1))
System.out.printf(" ");
} System.out.printf("%3d", Matriz[i][j]);
System.out.printf ("\t -- System.out.printf(" ");
>");
}
for ( int j = 0; j <
System.out.printf ("\t --
Matriz.length; j++ ){
>");
for ( int j = 0; j <
System.out.printf("%3d",
Matriz.length; j++ ){
rptaMatriz[i][j]);
}
System.out.printf("%3d",
System.out.printf("\n"); rptaMatriz[i][j]);
} }
} System.out.printf("\n");
else{ }
Rinvolutiva=("!!!\t No es }
una matriz involutiva");
else{
}
Rortogonal=("!!!\t No es
una matriz ortogonal");
if((ortogonal==Columna)&&(cont1==(Fil
}
a-1)*Fila)){
if((nilpotente == }
Fila*Columna)){
}
Rnilpotente=("✓✓✓\t Es
else{
una matriz Nilpotente");
Ridempotente=("!!!\t No es
for (int i = 0; i < Columna;
una matriz idempotente");
i++ ){
Rinvolutiva=("!!!\t No es una
for (int j = 0; j< Fila;
matriz involutiva");
j++){
Rortogonal=("!!!\t No es una
matriz ortogonal");
System.out.printf("%3d", Matriz[i][j]);
Rnilpotente=("!!!\t No es una
}
matriz Nilpotente");
System.out.printf("\t");
}
for (int j = 0; j <
//Matriz
Matriz.length; j++){
Simetrica ,ortogonal,involutiva,antisim
if ( i <= (Columna - 1)) etrica
if (Columna == Fila){
System.out.printf("%3d", Matriz[i][j]);
for ( int i = 0; i < Fila; i++) {
System.out.printf(" ");
for ( int j = 0; j < Columna;
} j++) {

System.out.printf ("\t -- if ((i!=j)&&(Matriz[i][j]


>"); == Matriz[j][i])) {

for ( int j = 0; j < simetrica ++;


Matriz.length; j++ ){
}
//Matriz antisimetrica
System.out.printf("%3d",
rptaMatriz[i][j]); if ((i!=j)&&(Matriz[i][j]
== -1*(Matriz[j][i]))) {
}
antisimetrica ++;
System.out.printf("\n");
}
}
}
}
}
else{
if (simetrica==(Fila-1)*Fila) {
Rnilpotente=("!!!\t No es
una matriz Nilpotente"); Rsimetrica=("✓✓✓\t
Simetrica");
}else{ uadrada+"\n"+Rnula +"\n"+
Rsuperior+"\n" + Rinferior+"\n"
Rsimetrica=("!!!\t No Es
Simetrica"); +Rdiagonal+"\n"+
Ridentidad+"\n"+
}
Ridempotente+"\n"+Rsimetrica
if (antisimetrica==(Fila- +"\n"+Rortogonal+"\n"+Rinvolutiva+"\
1)*Fila) { n"+

Rantisimetrica=("✓✓✓\t
Antisimetrica"); Rantisimetrica+"\n"+Rnilpotente);

}else{ return Matriz;}

Rantisimetrica=("!!!\t No
es Antisimetrica");
// Variables declaration - do not
} modify

}else{ private javax.swing.JButton


ButtonMostrarMatriz;
Rsimetrica=("!!!\t No Es
Cuadrada, Por lo Tanto No Es private javax.swing.JTable
Simetrica"); TablaMatriz;

Rantisimetrica=("!!!\t No Es private javax.swing.JButton jButton1;


Cuadrada, Por lo Tanto No Es
private javax.swing.JButton jButton2;
Antiimetrica");
private javax.swing.JButton jButton3;
private javax.swing.JScrollPane
}
jScrollPane1;
private javax.swing.JScrollPane
jScrollPane4;
private javax.swing.JTextArea
textAreaTipos;

textAreaTipos.setText(RFila+"\n"+ // End of variables declaration


}
RColumna+"\n"+Rrectangular+"\n"+Rc
Interfaz Gráfica

También podría gustarte