I wish to include Java-code formatted with lstlisting as a conclusion in a bussproofs proof tree. The code has to be in boxes so two peaces of code can be displayed next to each other in the same conclusion. I currently have the following, not working code. It works with plain text instead of listing but it looks bad. How do I put a listing for Java in there?
\documentclass[12pt, twoside]{scrreprt}
\usepackage{listings}
\usepackage{bussproofs}
\begin{document}
\begin{prooftree}
\AxiomC{more proof}
\UnaryInfC{
\parbox{.5\textwidth}{
\begin{lstlisting}[language=Java]
//nicely formated code
\end{lstlisting}
}
\parbox{.5\textwidth}{
\begin{lstlisting}[language=Java]
//more nicely formated code
\end{lstlisting}
}
}
\end{prooftree}
\end{document}

listingsin the argument to another command. – egreg Nov 19 '14 at 20:37