\lstset{backgroundcolor=\color[rgb]{0.9,0.9,0.9}, showstringspaces=false} 
\lstset{language=Java, basicstyle=\footnotesize, extendedchars=true}%, frame=single}
\lstset{xleftmargin=10pt, xrightmargin=10pt}
\lstset{framexleftmargin=10pt, framexrightmargin=10pt}
