There is one other way, much less commonly seen. Good for one LED, very simple, you can throw anything from about 4v to 20v at it, and it happily gives the LED a fairly constant current.
Blue is the input voltage, 20v to 4v. Green is the current to the LED, about 12mA. Red is the power dissipated by the JFET, datasheet here.
