Skip to content

Instantly share code, notes, and snippets.

@rrichardson
Created September 10, 2011 14:27
Show Gist options
  • Save rrichardson/1208362 to your computer and use it in GitHub Desktop.
Save rrichardson/1208362 to your computer and use it in GitHub Desktop.
def load[ChartType : Manifest](opts : ForexChartOptions) {
val ctClass = implicitly[Manifest[ChartType]].erasure
val mainchart = ctClass.newInstance.asInstanceOf[ChartType]
mainchart.pack()
RefineryUtilities.centerFrameOnScreen(mainchart)
mainchart.setVisible(true)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment