The method of lines is extended to inhomogeneous dielectric layers by means of an additonal transformation and special consideration of the discretized dielectric constant. The computed dispersion diagrams for dielectric waveguides agree very well with the results from other authors, including such cases, where backward waves exist. New results for the coupling between dielectric waveguides and a microstrip line are given.