-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathNewJDialog.java
766 lines (656 loc) · 39.4 KB
/
NewJDialog.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package hilos;
import java.io.File;
import java.util.ArrayList;
import javax.swing.JPanel;
/**
*
* @author abel
*/
public class NewJDialog extends javax.swing.JDialog {
/**
* Creates new form NewJDialog
*/
static ArrayList colonia;
static JPanel tierra;
public NewJDialog(java.awt.Frame parent, boolean modal,JPanel tierra,ArrayList colonia) {
super(parent, modal);
initComponents();
this.setSize(1000,250);
setLocationByPlatform(true);
this.tierra=tierra;
this.colonia=colonia;
tierra.validate();
}
public ArrayList getArca(){return colonia;}
/**
* 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">//GEN-BEGIN:initComponents
private void initComponents() {
jButton18 = new javax.swing.JButton();
jButton20 = new javax.swing.JButton();
jButton22 = new javax.swing.JButton();
jScrollPane1 = new javax.swing.JScrollPane();
jPanel1 = new javax.swing.JPanel();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jButton4 = new javax.swing.JButton();
jButton5 = new javax.swing.JButton();
jButton6 = new javax.swing.JButton();
jButton7 = new javax.swing.JButton();
jButton8 = new javax.swing.JButton();
jButton9 = new javax.swing.JButton();
jButton21 = new javax.swing.JButton();
jButton19 = new javax.swing.JButton();
jButton17 = new javax.swing.JButton();
jButton16 = new javax.swing.JButton();
jButton15 = new javax.swing.JButton();
jButton14 = new javax.swing.JButton();
jButton13 = new javax.swing.JButton();
jButton12 = new javax.swing.JButton();
jButton11 = new javax.swing.JButton();
jButton10 = new javax.swing.JButton();
jButton23 = new javax.swing.JButton();
jButton24 = new javax.swing.JButton();
jButton25 = new javax.swing.JButton();
jButton26 = new javax.swing.JButton();
jButton27 = new javax.swing.JButton();
jButton28 = new javax.swing.JButton();
jButton29 = new javax.swing.JButton();
jButton30 = new javax.swing.JButton();
jButton31 = new javax.swing.JButton();
jButton32 = new javax.swing.JButton();
jButton34 = new javax.swing.JButton();
jButton33 = new javax.swing.JButton();
jButton35 = new javax.swing.JButton();
jButton36 = new javax.swing.JButton();
jButton37 = new javax.swing.JButton();
jButton38 = new javax.swing.JButton();
jButton18.setText("jButton18");
jButton20.setText("jButton20");
jButton22.setText("jButton22");
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
jPanel1.setLayout(new java.awt.GridLayout());
jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/agua.gif"))); // NOI18N
jButton1.setText("F");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
jPanel1.add(jButton1);
jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/planta.png"))); // NOI18N
jButton2.setText("F");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jPanel1.add(jButton2);
jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/girasol.png"))); // NOI18N
jButton3.setText("F");
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jPanel1.add(jButton3);
jButton4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/rosaroja.png"))); // NOI18N
jButton4.setText("F");
jButton4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton4ActionPerformed(evt);
}
});
jPanel1.add(jButton4);
jButton5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/rosarosada.png"))); // NOI18N
jButton5.setText("F");
jButton5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton5ActionPerformed(evt);
}
});
jPanel1.add(jButton5);
jButton6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/plantaCria.png"))); // NOI18N
jButton6.setText("F");
jButton6.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton6ActionPerformed(evt);
}
});
jPanel1.add(jButton6);
jButton7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra1.gif"))); // NOI18N
jButton7.setText("F");
jButton7.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton7ActionPerformed(evt);
}
});
jPanel1.add(jButton7);
jButton8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra2.gif"))); // NOI18N
jButton8.setText("F");
jButton8.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton8ActionPerformed(evt);
}
});
jPanel1.add(jButton8);
jButton9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra3.gif"))); // NOI18N
jButton9.setText("F");
jButton9.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton9ActionPerformed(evt);
}
});
jPanel1.add(jButton9);
jButton21.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra4.gif"))); // NOI18N
jButton21.setText("F");
jButton21.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton21ActionPerformed(evt);
}
});
jPanel1.add(jButton21);
jButton19.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra5.gif"))); // NOI18N
jButton19.setText("F");
jButton19.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton19ActionPerformed(evt);
}
});
jPanel1.add(jButton19);
jButton17.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra6.gif"))); // NOI18N
jButton17.setText("F");
jButton17.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton17ActionPerformed(evt);
}
});
jPanel1.add(jButton17);
jButton16.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra7.gif"))); // NOI18N
jButton16.setText("F");
jButton16.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton16ActionPerformed(evt);
}
});
jPanel1.add(jButton16);
jButton15.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave1.gif"))); // NOI18N
jButton15.setText("F");
jButton15.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton15ActionPerformed(evt);
}
});
jPanel1.add(jButton15);
jButton14.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave1.gif"))); // NOI18N
jButton14.setText("M");
jButton14.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton14ActionPerformed(evt);
}
});
jPanel1.add(jButton14);
jButton13.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave2.gif"))); // NOI18N
jButton13.setText("F");
jButton13.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton13ActionPerformed(evt);
}
});
jPanel1.add(jButton13);
jButton12.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave2.gif"))); // NOI18N
jButton12.setText("M");
jButton12.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton12ActionPerformed(evt);
}
});
jPanel1.add(jButton12);
jButton11.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave3.gif"))); // NOI18N
jButton11.setText("F");
jButton11.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton11ActionPerformed(evt);
}
});
jPanel1.add(jButton11);
jButton10.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave3.gif"))); // NOI18N
jButton10.setText("M");
jButton10.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton10ActionPerformed(evt);
}
});
jPanel1.add(jButton10);
jButton23.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave4.gif"))); // NOI18N
jButton23.setText("F");
jButton23.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton23ActionPerformed(evt);
}
});
jPanel1.add(jButton23);
jButton24.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave4.gif"))); // NOI18N
jButton24.setText("M");
jButton24.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton24ActionPerformed(evt);
}
});
jPanel1.add(jButton24);
jButton25.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave5.gif"))); // NOI18N
jButton25.setText("F");
jButton25.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton25ActionPerformed(evt);
}
});
jPanel1.add(jButton25);
jButton26.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave5.gif"))); // NOI18N
jButton26.setText("M");
jButton26.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton26ActionPerformed(evt);
}
});
jPanel1.add(jButton26);
jButton27.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/canibal.gif"))); // NOI18N
jButton27.setText("F");
jButton27.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton27ActionPerformed(evt);
}
});
jPanel1.add(jButton27);
jButton28.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/canibal.gif"))); // NOI18N
jButton28.setText("M");
jButton28.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton28ActionPerformed(evt);
}
});
jPanel1.add(jButton28);
jButton29.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/elefanteP.gif"))); // NOI18N
jButton29.setText("F");
jButton29.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton29ActionPerformed(evt);
}
});
jPanel1.add(jButton29);
jButton30.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/elefanteP.gif"))); // NOI18N
jButton30.setText("M");
jButton30.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton30ActionPerformed(evt);
}
});
jPanel1.add(jButton30);
jButton31.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/hormiga.gif"))); // NOI18N
jButton31.setText("F");
jButton31.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton31ActionPerformed(evt);
}
});
jPanel1.add(jButton31);
jButton32.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/hormiga.gif"))); // NOI18N
jButton32.setText("M");
jButton32.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton32ActionPerformed(evt);
}
});
jPanel1.add(jButton32);
jButton34.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/leonbebe.png"))); // NOI18N
jButton34.setText("F");
jButton34.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton34ActionPerformed(evt);
}
});
jPanel1.add(jButton34);
jButton33.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/leonbebe.png"))); // NOI18N
jButton33.setText("M");
jButton33.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton33ActionPerformed(evt);
}
});
jPanel1.add(jButton33);
jButton35.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposaazul.gif"))); // NOI18N
jButton35.setText("F");
jButton35.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton35ActionPerformed(evt);
}
});
jPanel1.add(jButton35);
jButton36.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposaazul.gif"))); // NOI18N
jButton36.setText("M");
jButton36.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton36ActionPerformed(evt);
}
});
jPanel1.add(jButton36);
jButton37.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposarosa.gif"))); // NOI18N
jButton37.setText("F");
jButton37.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton37ActionPerformed(evt);
}
});
jPanel1.add(jButton37);
jButton38.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposarosa.gif"))); // NOI18N
jButton38.setText("M");
jButton38.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton38ActionPerformed(evt);
}
});
jPanel1.add(jButton38);
jScrollPane1.setViewportView(jPanel1);
getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton8ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton8ActionPerformed
Piedra esmeralda=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra2.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra2.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton8ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
Planta arbol=new Planta("arbol",new javax.swing.ImageIcon(getClass().getResource("/imagenes/planta.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/arbol.gif")),
true,tierra, colonia, 100000, 100000, 1000, 4, 0, 100000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton2ActionPerformed
private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
Planta girasol=new Planta("girasol",new javax.swing.ImageIcon(getClass().getResource("/imagenes/girasol.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/girasol.png")),
true,tierra, colonia, 4000, 4000, 1000, 4, 0, 4000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton3ActionPerformed
private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
Planta rosaR=new Planta("rosaroja",new javax.swing.ImageIcon(getClass().getResource("/imagenes/plantaCria.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/rosaroja.png")),
true,tierra, colonia, 4000, 4000, 1000, 4, 0, 4000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton4ActionPerformed
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
Agua agua=new Agua("agua",null,new javax.swing.ImageIcon(getClass().getResource("/imagenes/agua.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/agua.gif")),
true,tierra, colonia, 100000, 100000, 1, 0, 5, 100000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton1ActionPerformed
private void jButton15ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton15ActionPerformed
Herbivoro colibri=new Herbivoro("colibri","/audios/colibri.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave1.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave1.gif")),
true,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton15ActionPerformed
private void jButton14ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton14ActionPerformed
Herbivoro colibrim=new Herbivoro("colibri","/audios/colibri.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave1.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave1.gif")),
false,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
}//GEN-LAST:event_jButton14ActionPerformed
private void jButton13ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton13ActionPerformed
Herbivoro cotorra=new Herbivoro("cotorra","/audios/cotorra.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave2.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave2.gif")),
true,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton13ActionPerformed
private void jButton12ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton12ActionPerformed
Herbivoro cotorram=new Herbivoro("cotorra","/audios/cotorra.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave2.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave2.gif")),
false,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton12ActionPerformed
private void jButton11ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton11ActionPerformed
Herbivoro colibriV=new Herbivoro("colibriverde","/audios/colibri.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave3.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave3.gif")),
true,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton11ActionPerformed
private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
Herbivoro colibriVm=new Herbivoro("colibriverde","/audios/colibri.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave3.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave3.gif")),
false,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton10ActionPerformed
private void jButton23ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton23ActionPerformed
Carnivoro aguila=new Carnivoro("aguila","/audios/aguila.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave4.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave4.gif")),
true,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton23ActionPerformed
private void jButton24ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton24ActionPerformed
Carnivoro aguilam=new Carnivoro("aguila","/audios/aguila.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave4.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave4.gif")),
false,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton24ActionPerformed
private void jButton25ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton25ActionPerformed
Carnivoro lechuza=new Carnivoro("lechuza","/audios/lechuza.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave5.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave5.gif")),
true,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton25ActionPerformed
private void jButton26ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton26ActionPerformed
Herbivoro lechuzam=new Herbivoro("lechuza","/audios/lechuza.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave5.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/ave5.gif")),
false,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton26ActionPerformed
private void jButton27ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton27ActionPerformed
Omnivoro canibal=new Omnivoro("canibal","/audios/tamborflauta.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/canibalP.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/canibal.gif")),
true,tierra, colonia, 10000, 10000, 1000, 2, 5, 100);
// TODO add your handling code here:
}//GEN-LAST:event_jButton27ActionPerformed
private void jButton28ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton28ActionPerformed
Omnivoro canibalm=new Omnivoro("canibal","/audios/tamborflauta.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/canibalP.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/canibal.gif")),
false,tierra, colonia, 10000, 10000, 1000, 2, 5, 100);
// TODO add your handling code here:
}//GEN-LAST:event_jButton28ActionPerformed
private void jButton29ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton29ActionPerformed
Herbivoro elefante=new Herbivoro("elefante","/audios/elefante.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/elefanteP.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/elefante.gif")),
true,tierra, colonia, 10000, 10000, 2000, 2, 5, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton29ActionPerformed
private void jButton30ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton30ActionPerformed
Herbivoro elefantem=new Herbivoro("elefante","/audios/elefante.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/elefanteP.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/elefante.gif")),
false,tierra, colonia, 10000, 10000, 2000, 2, 5, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton30ActionPerformed
private void jButton31ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton31ActionPerformed
Herbivoro hormiga=new Herbivoro("hormiga","/audios/blanco.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/hormiga.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/hormiga.gif")),
true,tierra, colonia, 4000, 4000, 1000, 5, 5, 700);
// TODO add your handling code here:
}//GEN-LAST:event_jButton31ActionPerformed
private void jButton32ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton32ActionPerformed
Herbivoro hormigam=new Herbivoro("hormiga","/audios/blanco.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/hormiga.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/hormiga.gif")),
false,tierra, colonia, 4000, 4000, 1000, 5, 5, 700);
// TODO add your handling code here:
}//GEN-LAST:event_jButton32ActionPerformed
private void jButton34ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton34ActionPerformed
Carnivoro leon=new Carnivoro("leon","/audios/leon.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/leonbebe.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/leon.gif")),
true,tierra, colonia, 4000, 4000, 1000, 2, 5, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton34ActionPerformed
private void jButton33ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton33ActionPerformed
Carnivoro leonm=new Carnivoro("leon","/audios/leon.wav",new javax.swing.ImageIcon(getClass().getResource("/imagenes/leonbebe.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/leon.gif")),
false,tierra, colonia, 4000, 4000, 1000, 2, 3, 500);
// TODO add your handling code here:
}//GEN-LAST:event_jButton33ActionPerformed
private void jButton35ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton35ActionPerformed
Herbivoro mariposaA=new Herbivoro("mariposa",null,new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposaazul.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposaazul.gif")),
true,tierra, colonia, 4000, 4000, 1000, 5, 5, 700);
// TODO add your handling code here:
}//GEN-LAST:event_jButton35ActionPerformed
private void jButton36ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton36ActionPerformed
Herbivoro mariposaAm=new Herbivoro("mariposa",null,new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposaazul.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposaazul.gif")),
false,tierra, colonia, 4000, 4000, 1000, 5, 5, 700);
// TODO add your handling code here:
}//GEN-LAST:event_jButton36ActionPerformed
private void jButton37ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton37ActionPerformed
Herbivoro mariposaR=new Herbivoro("mariposa",null,new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposarosa.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposarosa.gif")),
true,tierra, colonia, 4000, 4000, 1000, 5, 5, 700);
// TODO add your handling code here:
}//GEN-LAST:event_jButton37ActionPerformed
private void jButton38ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton38ActionPerformed
Herbivoro mariposaRm=new Herbivoro("mariposa",null,new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposarosa.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/mariposarosa.gif")),
false,tierra, colonia, 4000, 4000, 1000, 5, 5, 700);
// TODO add your handling code here:
}//GEN-LAST:event_jButton38ActionPerformed
private void jButton7ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton7ActionPerformed
Piedra diamante=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra1.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra1.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton7ActionPerformed
private void jButton9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton9ActionPerformed
Piedra rubi=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra3.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra3.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton9ActionPerformed
private void jButton21ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton21ActionPerformed
Piedra amatista=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra4.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra4.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton21ActionPerformed
private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton19ActionPerformed
Piedra diamanteV=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra5.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra5.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton19ActionPerformed
private void jButton17ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton17ActionPerformed
Piedra aguam=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra6.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra6.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton17ActionPerformed
private void jButton16ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton16ActionPerformed
Piedra cuarzo=new Piedra("piedra",new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra7.gif")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/piedra7.gif")),
true,tierra, colonia, 10000, 10000, 1000, 0, 0, 1000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton16ActionPerformed
private void jButton6ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton6ActionPerformed
Planta planta=new Planta("planta",new javax.swing.ImageIcon(getClass().getResource("/imagenes/plantaCria.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/planta.png")),
true,tierra, colonia, 4000, 4000, 1000, 4, 0, 4000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton6ActionPerformed
private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed
Planta rosaRosa=new Planta("rosarosada",new javax.swing.ImageIcon(getClass().getResource("/imagenes/plantaCria.png")),
new javax.swing.ImageIcon(getClass().getResource("/imagenes/rosarosada.png")),
true,tierra, colonia, 4000, 4000, 1000, 4, 0, 4000);
// TODO add your handling code here:
}//GEN-LAST:event_jButton5ActionPerformed
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
/* 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/tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(NewJDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(NewJDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(NewJDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(NewJDialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
}
//</editor-fold>
/* Create and display the dialog */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
NewJDialog dialog = new NewJDialog(new javax.swing.JFrame(), true,tierra,colonia);
dialog.addWindowListener(new java.awt.event.WindowAdapter() {
@Override
public void windowClosing(java.awt.event.WindowEvent e) {System.exit(0);}
});
dialog.setVisible(true);
}
});
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton10;
private javax.swing.JButton jButton11;
private javax.swing.JButton jButton12;
private javax.swing.JButton jButton13;
private javax.swing.JButton jButton14;
private javax.swing.JButton jButton15;
private javax.swing.JButton jButton16;
private javax.swing.JButton jButton17;
private javax.swing.JButton jButton18;
private javax.swing.JButton jButton19;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton20;
private javax.swing.JButton jButton21;
private javax.swing.JButton jButton22;
private javax.swing.JButton jButton23;
private javax.swing.JButton jButton24;
private javax.swing.JButton jButton25;
private javax.swing.JButton jButton26;
private javax.swing.JButton jButton27;
private javax.swing.JButton jButton28;
private javax.swing.JButton jButton29;
private javax.swing.JButton jButton3;
private javax.swing.JButton jButton30;
private javax.swing.JButton jButton31;
private javax.swing.JButton jButton32;
private javax.swing.JButton jButton33;
private javax.swing.JButton jButton34;
private javax.swing.JButton jButton35;
private javax.swing.JButton jButton36;
private javax.swing.JButton jButton37;
private javax.swing.JButton jButton38;
private javax.swing.JButton jButton4;
private javax.swing.JButton jButton5;
private javax.swing.JButton jButton6;
private javax.swing.JButton jButton7;
private javax.swing.JButton jButton8;
private javax.swing.JButton jButton9;
private javax.swing.JPanel jPanel1;
private javax.swing.JScrollPane jScrollPane1;
// End of variables declaration//GEN-END:variables
}