import java.io.*;
import javax.swing.*;

public class gui_interface{


   private static void pause() {
    try {
      System.in.read();
    }
    catch (IOException e) {
    }
  }  // pause


  public static void test1() {
    JIF f1 = new JIF("1. Instanz");
    JF f2 = new JF("2. Instanz");
    System.out.println(f1.name);
    System.out.println(f2.name);
    ISMS i1 = f1;
    ISMS i2 = f2;
    i1.sendSMS();
    i2.sendSMS();
  }

  public static void main(String[] args) {
    test1();
    pause();
  }
}
class JIF extends JInternalFrame implements ISMS{
   public String name="";

   public JIF(String name) {
     this.name=name;
   }
	public void sendSMS() {
       System.out.println("JF sendsms");

	}

}


class JF extends JFrame  implements ISMS {
   public String name="";

   public JF(String name) {
     this.name=name;
   }

	public void sendSMS() {
       System.out.println("JF sendsms");

	}

}

interface ISMS {
  void sendSMS();

}
