Synthesis and optical and electrochemical properties of julolidine-structured pyrido[3,4-b]indole dye.