/** Builds a BarChartGenerator and attaches it as a display in a MASON simulation. */ public static BarChartGenerator buildBarChartGenerator(GUIState state, String title) { BarChartGenerator chart = buildBarChartGenerator(title); JFrame frame = chart.createFrame(); frame.setVisible(true); frame.pack(); state.controller.registerFrame(frame); return chart; }