\documentclass{article}

\usepackage{jmlrutils}

\begin{document}
Reference \figureref{fig:ex-a} and \tableref{tab:ex-b}.

\begin{figure}
\floatconts
{fig:ex}%label
{\caption{Sample Figure}}% caption
{%
  \subfigure{\label{fig:ex-a}\fbox{A}}\qquad
  \subfigure{\label{fig:ex-b}\fbox{B}}%
}
\end{figure}

\begin{table}
\floatconts
{tab:ex}%label
{\caption{Sample Table}}% caption
{%
  \subtable{\label{tab:ex-a}\fbox{A}}\qquad
  \subtable{\label{tab:ex-b}\fbox{B}}%
}
\end{table}
\end{document}
