examples

Class Telnet

    • Constructor Summary

      Constructors 
      Constructor and Description
      Telnet()
      Constructor which will cause the window to prompt the user for the server to connect to.
      Telnet(java.lang.String remoteHost)
      Constructor which will cause a connection to the default port (23) on the given host.
      Telnet(java.lang.String remoteHost, int remotePort)
      Constructor which will cause a connection to a specified port on the given host.
    • Method Summary

      Methods 
      Modifier and Type Method and Description
      static void main(java.lang.String[] argv)
      Run the application
      void startMeUp()
      Create the terminal window and connect to the remote host.
      void windowClosing(java.awt.event.WindowEvent e)
      Handles window close events by closing the socket to the server (if any).
      • Methods inherited from class java.awt.event.WindowAdapter

        windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Telnet

        public Telnet()
        Constructor which will cause the window to prompt the user for the server to connect to.
      • Telnet

        public Telnet(java.lang.String remoteHost)
        Constructor which will cause a connection to the default port (23) on the given host.
      • Telnet

        public Telnet(java.lang.String remoteHost,
              int remotePort)
        Constructor which will cause a connection to a specified port on the given host.
    • Method Detail

      • startMeUp

        public void startMeUp()
        Create the terminal window and connect to the remote host.
      • main

        public static void main(java.lang.String[] argv)
        Run the application
      • windowClosing

        public void windowClosing(java.awt.event.WindowEvent e)
        Handles window close events by closing the socket to the server (if any).
        Specified by:
        windowClosing in interface java.awt.event.WindowListener
        Overrides:
        windowClosing in class java.awt.event.WindowAdapter