Professional Documents
Culture Documents
ENSAMBLADORES
ENSAMBLADORES
SEDE IBARRA
ESCUELA DE INGENIERA
VERSION 5.00
ScaleMode = 1
AutoRedraw = False
FontTransparent = True
'Icon = n/a
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ClientLeft = 45
ClientTop = 285
ClientWidth = 3975
ClientHeight = 3195
ShowInTaskbar = 0 'False
= 2520
Width = 1695
Height = 495
TabIndex = 11
End
Left = 120
Top = 2520
Width = 1695
Height = 495
TabIndex = 10
End
Caption = "/"
Left = 3240 Top
= 1800
Width = 615
Height = 495
TabIndex = 9
BeginProperty Font
Size = 13,5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Caption = "x"
Left = 2160 Top
= 1800
Width = 615
Height = 495
TabIndex = 8
BeginProperty Font
Size = 13,5
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Caption = "-"
Left = 1200
Top = 1800
Width = 615
Height = 495
TabIndex = 7
BeginProperty Font
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Caption = "+"
Left = 120
Top = 1800
Width = 615
Height = 495
TabIndex = 6
BeginProperty Font
Size = 13,5
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Left = 1680
Top = 1080
Width = 1215
Height = 405
TabIndex = 5
BeginProperty Font
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Left = 1680
Top = 600
Width = 1215
Height = 405
TabIndex = 4
BeginProperty Font
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Top = 120
Width = 1215
Height = 405
TabIndex = 3
BeginProperty Font
Size = 9,75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Caption = "Resultado"
Left = 240
Top = 1200
Width = 1095
Height = 255
TabIndex = 2
BeginProperty Font
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Caption = "Cantidad2"
Left = 240 Top
= 720
Width = 1095
Height = 615
TabIndex = 1
BeginProperty Font
Size = 9,75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
End
Caption = "Cantidad1"
Left = 240 Top
= 240
Width = 1215
Height = 495
TabIndex = 0
BeginProperty Font
Charset = 0
Weight = 700
Strikethrough = 0 'False
EndProperty
End
End
EJERCICIO 2
Code: TinyFormat
Start: 402051
Size: 23
nop
End Sub
JD-GUI Ejercicio 3
package investigacionoperaciones;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.UIManager; import
javax.swing.UIManager.LookAndFeelInfo; import
javax.swing.UnsupportedLookAndFeelException; import
javax.swing.border.MatteBorder; import
javax.swing.table.DefaultTableModel; import
javax.swing.table.TableModel;
TableModel tableModelDatos;
TableModel tableModelDatos2;
TableModel tableModelDatos3;
public Ejecutar()
initComponents();
setDefaultCloseOperation(3);
this.jScrollPane1.setViewportView(this.Tabla);
this.Btn_Generar.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
Ejecutar.this.Btn_GenerarActionPerformed(evt);
});
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
.addComponent(this.jLabel2)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(this.jLabel1)
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
.addComponent(this.txtNumFilas))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addContainerGap(18, 32767)));
jPanel1Layout.setVerticalGroup(jPanel1Layout
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(this.jLabel2)
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.BASELINE)
.addComponent(this.jLabel1)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap(29, 32767)));
this.jPanel2.setBorder(new MatteBorder(null));
this.Btn_Equilibrar.addActionListener(new ActionListener()
Ejecutar.this.Btn_EsquinaNoroesteActionPerformed(evt);
} });
Ejecutar.this.BtnCostoMinimoActionPerformed(evt);
});
.addGroup(jPanel2Layout.createSequentialGroup()
.addContainerGap()
.addComponent(this.Btn_Equilibrar)
.addComponent(this.Btn_EsquinaNoroeste)
.addComponent(this.BtnCostoMinimo)
.addContainerGap(41, 32767)));
jPanel2Layout.setVerticalGroup(jPanel2Layout
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(jPanel2Layout.createSequentialGroup()
.addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
.addGroup(jPanel2Layout.createParallelGroup(GroupLayout.Alignment.LEADING, false)
.addContainerGap(36, 32767)));
this.Txta_Impresion.setColumns(20); this.Txta_Impresion.setRows(5);
this.jScrollPane3.setViewportView(this.Txta_Impresion);
this.jScrollPane4.setViewportView(this.TablaDatos3);
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(this.jLabel4)
.addComponent(this.jLabel5)
.addGroup(GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap(-1, 32767)
.addComponent(this.jLabel3)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addContainerGap(-1, 32767)));
layout.setVerticalGroup(layout
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(this.jLabel3)
.addGap(9, 9, 9)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(this.jLabel5)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.TRAILING)
.addContainerGap()));
pack();
ArrayList<Integer> vectorOferta;
ArrayList<Integer> vectorDemanda;
ArrayList<Integer> Demanda;
ArrayList<Integer> oferta;
Object[] auxDemanda;
Object[] auxOferta;
DefaultTableModel mitableModel;
DefaultTableModel mitableModel2;
DefaultTableModel mitableModel3;
Object[][] matriz; boolean temp =
false; int temfilas; int temcolumnas;
int auxi; int auxj; int sumaMinima;
boolean rec;
private void Btn_GenerarActionPerformed(ActionEvent evt)
this.tableModelDatos = this.Tabla.getModel();
this.mitableModel.setNumRows(this.filas);
this.mitableModel.setColumnCount(this.columnas); int
cont = 1; this.vectorOferta = new ArrayList();
this.vectorDemanda = new ArrayList(); this.oferta = new
ArrayList(); this.Demanda = new ArrayList();
this.mitableModel2 = ((DefaultTableModel)this.TablaDatos2.getModel());
this.modelo2.clear();
this.mitableModel2.setNumRows(this.filas);
this.mitableModel2.setColumnCount(this.columnas);
this.tableModelDatos3 = this.TablaDatos3.getModel();
this.mitableModel3 = ((DefaultTableModel)this.TablaDatos3.getModel());
this.modelo3.clear();
this.mitableModel3.setNumRows(this.filas);
this.mitableModel3.setColumnCount(this.columnas); for (int i =
0; i < this.filas; i++)
{
this.tableModelDatos.setValueAt("OFERTA ", i, j + 1);
this.tableModelDatos2.setValueAt("OFERTA ", i, j + 1);
this.tableModelDatos3.setValueAt("OFERTA ", i, j + 1); this.matriz[i][(j + 1)] = "OFERTA ";
} }
else if (j == 0)
} }
this.tableModelDatos.setValueAt(Integer.valueOf(num), i, j);
this.tableModelDatos2.setValueAt(Integer.valueOf(num), i, j);
this.tableModelDatos3.setValueAt(Integer.valueOf(num), i, j); this.matriz[i][j] =
Integer.valueOf(num);
else if (i == this.filas - 1)
this.vectorDemanda.add(Integer.valueOf(num3));
this.Demanda.add(Integer.valueOf(num3)); this.auxDemanda[j] =
Integer.valueOf(num3); this.sumaDemanda += num3;
this.matriz[i][j] = Integer.valueOf(num3);
} }
int num3 = (int)(Math.random() * 31.0D + 120.0D); if (i <
this.filas - 2)
1);
1);
1);
{ this.vectorOferta.add(Integer.valueOf(num3));
this.oferta.add(Integer.valueOf(num3)); this.sumaOferta
+= num3;
this.auxOferta[cont] = Integer.valueOf(num3);
} cont++; }
this.Tabla.setVisible(false);
this.TablaDatos3.setVisible(false);
this.temp = true;
if (this.temp)
{
} else
{
{ try
{
((Integer)this.vectorDemanda.get(j - 1)).intValue())
((Integer)this.vectorDemanda.get(j - 1)).intValue();
((Integer)this.vectorDemanda.get(j - 1)).intValue();
- ((Integer)this.vectorDemanda.get(j - 1)).intValue();
this.vectorOferta.set(i - 1, Integer.valueOf(calculOferta));
this.vectorDemanda.set(j - 1, Integer.valueOf(calculoDemanda));
} else
{
this.tableModelDatos.setValueAt("", i, j);
} }
((Integer)this.vectorOferta.get(j - 1)).intValue();
((Integer)this.vectorOferta.get(i - 1)).intValue();
((Integer)this.vectorOferta.get(i - 1)).intValue();
} else
{
this.tableModelDatos.setValueAt("", i, j);
} }
} else
{
JOptionPane.showMessageDialog(this, e.getMessage());
int confila = 1;
{ try {
this.TablaDatos3.setVisible(true);
this.datosTem = new ArrayList();
int a = BuscarMenor();
((Integer)this.oferta.get(this.auxi - 1)).intValue())
DatosX2(this.auxi, this.auxj);
} else
{
this.TablaDatos3.setValueAt(this.Demanda.get(this.auxj - 1), this.auxi, this.auxj);
DatosX(this.auxi, this.auxj);
} }
catch (Exception e)
JOptionPane.showMessageDialog(null, e.getCause());
{ this.auxi = 0; this.auxj =
0; int aux = ValoxTemp();
} } return
aux;
this.tableModelDatos.setValueAt(Integer.valueOf(0), i, j);
this.tableModelDatos3.setValueAt(Integer.valueOf(0), i, j); if (j == 0) {
this.tableModelDatos.setValueAt("Suc " + i, i, j); this.tableModelDatos3.setValueAt("Suc "
+ i, i, j);
if (j == this.columnas - 1)
{ this.tableModelDatos.setValueAt(Integer.valueOf(sum), i, j);
this.tableModelDatos3.setValueAt(Integer.valueOf(sum), i, j);
this.vectorOferta.add(Integer.valueOf(sum));
this.oferta.add(Integer.valueOf(sum));
} }
this.mitableModel.addRow(this.auxDemanda);
this.mitableModel3.addRow(this.auxDemanda);
this.filas += 1; this.sumaOferta += sum;
this.tableModelDatos.setValueAt(Integer.valueOf(0), i, j);
this.tableModelDatos3.setValueAt(Integer.valueOf(0), i, j); if (i == 0)
{ this.tableModelDatos.setValueAt("Pers " + j, i, j);
this.tableModelDatos3.setValueAt("Pers " + j, i, j);
if (i == this.filas - 1)
{ this.tableModelDatos.setValueAt(Integer.valueOf(sum), i, j);
this.tableModelDatos3.setValueAt(Integer.valueOf(sum), i, j);
this.vectorDemanda.add(Integer.valueOf(sum));
this.Demanda.add(Integer.valueOf(sum));
} }
this.auxOferta[0] = "OFERTA";
this.mitableModel.addColumn("Z", this.auxOferta);
this.mitableModel3.addColumn("Z", this.auxOferta);
this.columnas += 1; this.sumaDemanda += sum;
} sumaDatos();
(!(this.tableModelDatos3.getValueAt(i, j) + "").equals("x")))
} } return
aux;
} return suma;
{
Object tem1 = Verificador(this.TablaDatos3.getValueAt(h, j)); if
(!tem1.equals("a")) {
} else {
this.TablaDatos3.setValueAt("x", h, j);
} else {
this.TablaDatos3.setValueAt("x", i, h);
{ rec = this.datosTem.get(i); i
= this.datosTem.size();
} } return
rec;
UIManager.setLookAndFeel(info.getClassName()); break;
} }
EventQueue.invokeLater(new Runnable()
new Ejecutar().setVisible(true);
});
}
}
Ejercicio 4
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.UIManager; import
javax.swing.UIManager.LookAndFeelInfo; import
javax.swing.UnsupportedLookAndFeelException;
public PlayGame() {
initComponents();
{
Object tem = auxInte.next(); int num =
Integer.parseInt(tem.toString()); numbers[aux] =
num; aux++; }
this.btnC10.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[9] + ".png")));
this.btnC11.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[10] + ".png")));
this.btnC12.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[11] + ".png")));
this.btnC13.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[12] + ".png")));
this.btnC14.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[13] + ".png")));
this.btnC15.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[14] + ".png")));
this.btnC16.setDisabledIcon(new ImageIcon(getClass().getResource("/imagenes/c" +
numbers[15] + ".png")));
}
if (!this.caraUp)
btn.setEnabled(false);
this.im1 = ((ImageIcon)btn.getDisabledIcon());
this.pbtn[0] = btn; this.caraUp = true; this.primerc =
false;
} else {
btn.setEnabled(false);
this.im2 = ((ImageIcon)btn.getDisabledIcon());
this.pbtn[1] = btn; this.primerc = true; this.puntaje +=
20; pregwin();
if (this.im1.getDescription().compareTo(this.im2.getDescription()) != 0)
{ this.pbtn[0].setEnabled(true);
this.pbtn[1].setEnabled(true); if
(this.puntaje > 10) { this.puntaje -= 10;
} }
this.caraUp = false;
}
{ this.btnC1.setEnabled(true);
this.btnC2.setEnabled(true);
this.btnC3.setEnabled(true);
this.btnC4.setEnabled(true);
this.btnC5.setEnabled(true);
this.btnC6.setEnabled(true);
this.btnC7.setEnabled(true);
this.btnC8.setEnabled(true);
this.btnC9.setEnabled(true);
this.btnC10.setEnabled(true);
this.btnC11.setEnabled(true);
this.btnC12.setEnabled(true);
this.btnC13.setEnabled(true);
this.btnC14.setEnabled(true);
this.btnC15.setEnabled(true);
this.btnC16.setEnabled(true);
(!this.btnC16.isEnabled())) {
this.btnC1.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC1.setBorder(null); this.btnC1.setBorderPainted(false);
this.btnC1.setContentAreaFilled(false); this.btnC1.setFocusable(false);
this.btnC1.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC1.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC1MouseExited(evt);
} });
this.btnC1.addActionListener(new ActionListener()
PlayGame.this.btnC1ActionPerformed(evt);
} });
this.btnC2.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC2.setBorder(null); this.btnC2.setBorderPainted(false);
this.btnC2.setContentAreaFilled(false); this.btnC2.setFocusable(false);
this.btnC2.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC2.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC2MouseExited(evt);
} });
this.btnC2.addActionListener(new ActionListener()
PlayGame.this.btnC2ActionPerformed(evt);
} });
this.btnC3.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC3.setBorder(null); this.btnC3.setBorderPainted(false);
this.btnC3.setContentAreaFilled(false); this.btnC3.setFocusable(false);
this.btnC3.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC3.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC3MouseExited(evt);
} });
this.btnC3.addActionListener(new ActionListener()
{
PlayGame.this.btnC3ActionPerformed(evt);
} });
this.btnC4.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC4.setBorder(null); this.btnC4.setBorderPainted(false);
this.btnC4.setContentAreaFilled(false); this.btnC4.setFocusable(false);
this.btnC4.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC4.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC4MouseExited(evt);
} });
this.btnC4.addActionListener(new ActionListener()
PlayGame.this.btnC4ActionPerformed(evt);
} });
this.btnC8.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC8.setBorder(null); this.btnC8.setBorderPainted(false);
this.btnC8.setContentAreaFilled(false); this.btnC8.setFocusable(false);
this.btnC8.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC8.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC8MouseExited(evt);
} });
this.btnC8.addActionListener(new ActionListener()
PlayGame.this.btnC8ActionPerformed(evt);
} });
this.btnC7.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC7.setBorder(null); this.btnC7.setBorderPainted(false);
this.btnC7.setContentAreaFilled(false); this.btnC7.setFocusable(false);
this.btnC7.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC7.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC7MouseExited(evt);
});
this.btnC7.addActionListener(new ActionListener()
PlayGame.this.btnC7ActionPerformed(evt);
} });
this.btnC6.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC6.setBorder(null); this.btnC6.setBorderPainted(false);
this.btnC6.setContentAreaFilled(false); this.btnC6.setFocusable(false);
this.btnC6.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC6.addMouseListener(new
MouseAdapter()
{
public void mouseExited(MouseEvent evt)
PlayGame.this.btnC6MouseExited(evt);
} });
this.btnC6.addActionListener(new ActionListener()
PlayGame.this.btnC6ActionPerformed(evt);
} });
this.btnC5.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC5.setBorder(null); this.btnC5.setBorderPainted(false);
this.btnC5.setContentAreaFilled(false); this.btnC5.setFocusable(false);
this.btnC5.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC5.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC5MouseExited(evt);
} });
this.btnC5.addActionListener(new ActionListener()
PlayGame.this.btnC5ActionPerformed(evt);
} });
this.btnC12.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC12.setBorder(null); this.btnC12.setBorderPainted(false);
this.btnC12.setContentAreaFilled(false); this.btnC12.setFocusable(false);
this.btnC12.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC12.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC12MouseExited(evt);
} });
this.btnC12.addActionListener(new ActionListener() {
PlayGame.this.btnC12ActionPerformed(evt);
} });
this.btnC11.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC11.setBorder(null); this.btnC11.setBorderPainted(false);
this.btnC11.setContentAreaFilled(false); this.btnC11.setFocusable(false);
this.btnC11.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC11.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC11MouseExited(evt);
} });
this.btnC11.addActionListener(new ActionListener()
PlayGame.this.btnC11ActionPerformed(evt);
} });
this.btnC10.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC10.setBorder(null); this.btnC10.setBorderPainted(false);
this.btnC10.setContentAreaFilled(false); this.btnC10.setFocusable(false);
this.btnC10.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC10.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC10MouseExited(evt);
} });
this.btnC10.addActionListener(new ActionListener()
PlayGame.this.btnC10ActionPerformed(evt);
} });
this.btnC9.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC9.setBorder(null); this.btnC9.setBorderPainted(false);
this.btnC9.setContentAreaFilled(false); this.btnC9.setFocusable(false);
this.btnC9.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC9.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC9MouseExited(evt);
} });
this.btnC9.addActionListener(new ActionListener()
PlayGame.this.btnC9ActionPerformed(evt);
} });
this.btnC16.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC16.setBorder(null); this.btnC16.setBorderPainted(false);
this.btnC16.setContentAreaFilled(false); this.btnC16.setFocusable(false);
this.btnC16.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC16.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC16MouseExited(evt);
} });
this.btnC16.addActionListener(new ActionListener()
PlayGame.this.btnC16ActionPerformed(evt);
} });
this.btnC15.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC15.setBorder(null); this.btnC15.setBorderPainted(false);
this.btnC15.setContentAreaFilled(false); this.btnC15.setFocusable(false);
this.btnC15.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC15.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC15MouseExited(evt);
} });
this.btnC15.addActionListener(new ActionListener()
PlayGame.this.btnC15ActionPerformed(evt);
} });
this.btnC14.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC14.setBorder(null); this.btnC14.setBorderPainted(false);
this.btnC14.setContentAreaFilled(false); this.btnC14.setFocusable(false);
this.btnC14.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC14.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC14MouseExited(evt);
} });
this.btnC14.addActionListener(new ActionListener()
PlayGame.this.btnC14ActionPerformed(evt);
} });
this.btnC13.setIcon(new ImageIcon(getClass().getResource("/imagenes/c0.png")));
this.btnC13.setBorder(null); this.btnC13.setBorderPainted(false);
this.btnC13.setContentAreaFilled(false); this.btnC13.setFocusable(false);
this.btnC13.setRolloverIcon(new
ImageIcon(getClass().getResource("/imagenes/cr.png"))); this.btnC13.addMouseListener(new
MouseAdapter()
PlayGame.this.btnC13MouseExited(evt);
} });
this.btnC13.addActionListener(new ActionListener()
{
PlayGame.this.btnC13ActionPerformed(evt);
});
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(this.btnC1)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(this.btnC2)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC3)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC4))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(this.btnC5)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(this.btnC6)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED) .addComponent(this.btnC7)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC8))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(this.btnC9)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC10)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC11)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC12))
.addGroup(jPanel1Layout.createSequentialGroup()
.addComponent(this.btnC13)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC14)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC15)
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addComponent(this.btnC16)))
.addContainerGap(-1, 32767)));
jPanel1Layout.setVerticalGroup(jPanel1Layout
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addContainerGap()
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(this.btnC2)
.addComponent(this.btnC1)
.addComponent(this.btnC3)
.addComponent(this.btnC4))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(this.btnC6)
.addComponent(this.btnC5)
.addComponent(this.btnC7)
.addComponent(this.btnC8))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(this.btnC9)
.addComponent(this.btnC10)
.addComponent(this.btnC11)
.addComponent(this.btnC12))
.addPreferredGap(LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addComponent(this.btnC13)
.addComponent(this.btnC14)
.addComponent(this.btnC15)
.addComponent(this.btnC16))
.addContainerGap(-1, 32767)));
this.btnReiniciar.addActionListener(new ActionListener()
PlayGame.this.btnReiniciarActionPerformed(evt);
});
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addContainerGap(-1, 32767))
.addGroup(layout.createSequentialGroup()
.addContainerGap(-1, 32767)
.addComponent(this.jLabel1)
.addComponent(this.btnReiniciar)
layout.setVerticalGroup(layout
.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(this.btnReiniciar))
.addComponent(this.jLabel1))
.addContainerGap()));
btnEnabled(this.btnC1);
btnEnabled(this.btnC2);
btnEnabled(this.btnC3);
}
btnEnabled(this.btnC4);
btnEnabled(this.btnC5);
btnEnabled(this.btnC6);
btnEnabled(this.btnC7);
btnEnabled(this.btnC8);
btnEnabled(this.btnC9);
btnEnabled(this.btnC10);
}
private void btnC11ActionPerformed(ActionEvent evt)
btnEnabled(this.btnC11);
btnEnabled(this.btnC12);
btnEnabled(this.btnC13);
btnEnabled(this.btnC14);
btnEnabled(this.btnC15);
btnEnabled(this.btnC16);
{ compare();
{ compare();
}
{ compare();
{ compare();
{ compare();
{ compare();
{ compare();
{ compare();
{ compare();
{ compare();
{ compare(); }
{ compare();
}
{ compare();
{ compare();
{ compare();
{ compare();
reiniciar();
UIManager.setLookAndFeel(info.getClassName()); break;
} }
EventQueue.invokeLater(new Runnable()
new PlayGame().setVisible(true);
});