I have defined a custom float using the newfloat command from the float package. My custom float uses the ruled style, defined in the same package. This is a minimal example of what I'm doing:
\documentclass{article}
\usepackage{float}
\floatstyle{ruled}
\newfloat{Foo}{thp}{lop}
\floatname{Foo}{Foobar}
\begin{document}
\begin{Foo}
\begin{verbatim}
public void foo(int bar) {
foo();
bar();
}
\end{verbatim}
\caption{An example of a foobar program}
\end{Foo}
\end{document}
What I don't like, is the vertical space that lies between the last line of the contents and the bottom rule of the float. Is there a way to reduce that space?