HILOS EN JFRAME DE JAVA
DEFINICIÓN DE JFRAME public class NewJFrame extends javax.swing.JFrame implements Runnable { Thread h1, h2; ... MÉTODO RUN EN EL JFRAME public void run() { for (int i = 0; i < 5 ; i++){ Thread ct = Thread.currentThread(); if(ct == h1) { System.out.println(i + " h1 " + Thread.currentThread().getName()); } if(ct == h2) { System.out.println(i + " h2 " + Thread.currentThread().getName()); ...