# Combining a userdefined float inside a shadowbox

Is it possible to combine the "program" part in a shadowbox?

\documentclass{article}

\usepackage{float}

\floatstyle{ruled}
\newfloat{program}{thp}{lop}
\floatname{program}{Program}

\begin{document}

\begin{program} ## FROM HERE
\begin{lstlinsting}[basicstyle={\footnotesize},language=Java,showstringspaces=false,tabsize=4]

class HelloWorldApp {
public static void main(String[] args) {
//Display the string
System.out.println("Hello World!");
}
}
\end{lstlisting}
\caption{The Hello World! program in Java.}
\end{program} ## TO HERE

\end{document}


Example is slightly modified from the one at the bottom of link text. Here is an image of what I want to put in the shadowbox. The image is borrowed from the above page.

-

## migrated from stackoverflow.comApr 4 '11 at 19:59

This question came from our site for professional and enthusiast programmers.

not sure if this will work exactly how you want it, but it looks pretty close: shadethm package: ctan.org/tex-archive/macros/latex/contrib/shadethm –  Mica Jan 29 '10 at 17:14