I want to put a listing code inside a gray container, similar to the following picture:
To do this, I used the following
\documentclass[svgnames]{report}
\usepackage{tikz}
\usepackage{verbatim}
\usepackage{kpfonts}
\usepackage[explicit]{titlesec}
\usetikzlibrary{calc}
\usetikzlibrary{shadows}
\usetikzlibrary{shadows.blur}
\usetikzlibrary{matrix}
\usetikzlibrary{shapes,snakes}
\usetikzlibrary{shapes.geometric, arrows}
\usepackage{listings}
\definecolor{codegreen}{rgb}{0,0,0}
\definecolor{codegray}{rgb}{0,0,0}
\definecolor{codepurple}{rgb}{0,0,0}
%\definecolor{backcolour}{rgb}{0.95,0.95,0.92}
\definecolor{backcolour}{rgb}{1,1,1}
\lstdefinestyle{mystyle}{
backgroundcolor=\color{backcolour},
commentstyle=\color{codegreen},
numberstyle=\tiny\color{codegray},
stringstyle=\color{codepurple},
basicstyle=\normalsize\ttfamily,
breakatwhitespace=false,
breaklines=true,
captionpos=b,
keepspaces=true,
numbers=none,
numbersep=5pt,
showspaces=false,
showstringspaces=false,
showtabs=false,
tabsize=4,
lineskip=.1cm
}
\lstset{style=mystyle}
\begin{document}
\tikzstyle{Container} = [draw=none, fill=gray, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt]
\tikzstyle{ProgramBox} = [draw=black, fill=white,thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow={color=black}
]
\tikzstyle{ExampleBox} = [draw=black, fill=white, thick,
rectangle, rounded corners, inner sep=10pt, inner ysep=20pt,drop shadow={color=black}]
\begin{center}
\begin{tikzpicture}
\label{num}
\node [Container](container){
\begin{tikzpicture}
\node [ProgramBox] (pbox){%
\begin{minipage}{1\textwidth}
\hrule width \hsize height 1pt
\lstinputlisting[language=Java]{FristProgram.java}
\hrule width \hsize \kern 1mm \hrule width \hsize height 1pt
\end{minipage}
};
\end{tikzpicture}
};
\node [ExampleBox, left = -150pt] at (container.south west) {
\begin{minipage}{0.3\textwidth}
this\\
is \\
the \\
first \\
example
\end{minipage}
};
\node [ExampleBox,right = -150pt] at (container.south east) {
\begin{minipage}{0.3\textwidth}
this\\
is \\
the \\
second \\
example \\
which \\
is \\
larger\\
than \\
first\\
example
\end{minipage}
};
\end{tikzpicture}%
\end{center}
\end{document}
this code generates the following output:

As it can be seen, the examples are not positioned in right places. How can I fix this problem??



