The near-field lateral intensity distribution of 405 nm (Al,In)GaN laser diodes is measured in time and wavelength domain. Spectral properties, relaxation oscillations, and filaments are observed. A thermally induced change of the refractive index profile is found to be the driving force behind changes in the dynamic mode configuration. With rate equations those effects can be described in first approximation.