question: private JPanel createScatterPlotDialog ( ContinuousVariable yVariable , ContinuousVariable xVariable ) { String dialogTitle = "Scatter Plots" ; JPanel panel = new JPanel ( ) ; panel . setLayout ( new BorderLayout ( ) ) ; DataSet dataSet = ( DataSet ) dataEditor . getSelectedDataModel ( ) ; ScatterPlotOld scatterPlot = new ScatterPlotOld ( dataSet , yVariable , xVariable ) ; ScatterPlotEditorPanel editorPanel = new ScatterPlotEditorPanel ( scatterPlot , dataSet ) ; ScatterPlotDisplayPanelOld display = new ScatterPlotDisplayPanelOld ( scatterPlot ) ; editorPanel . addPropertyChangeListener ( new ScatterPlotListener ( display ) ) ; JMenuBar bar = new JMenuBar ( ) ; JMenu menu = new JMenu ( "File" ) ; menu . add ( new JMenuItem ( new SaveComponentImage ( display , "Save Scatter Plot" ) ) ) ; bar . add ( menu ) ; Box box = Box . createHorizontalBox ( ) ; box . add ( display ) ; box . add ( Box . createHorizontalStrut ( 3 ) ) ; box . add ( editorPanel ) ; box . add ( Box . createHorizontalStrut ( 5 ) ) ; box . add ( Box . createHorizontalGlue ( ) ) ; Box vBox = Box . createVerticalBox ( ) ; vBox . add ( Box . createVerticalStrut ( 15 ) ) ; vBox . add ( box ) ; vBox . add ( Box . createVerticalStrut ( 5 ) ) ; panel . add ( bar , BorderLayout . NORTH ) ; panel . add ( vBox , BorderLayout . CENTER ) ; return panel ; }
target:  Creates a dialog that is showing the histogram for the given node (if null one is selected for you)