public InstancesSummaryPanel(){
  GridBagLayout gbLayout=new GridBagLayout();
  setLayout(gbLayout);
  JLabel lab=new JLabel("Relation:",SwingConstants.RIGHT);
  lab.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
  GridBagConstraints gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.EAST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=0;
  gbConstraints.gridx=0;
  gbLayout.setConstraints(lab,gbConstraints);
  add(lab);
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.WEST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=0;
  gbConstraints.gridx=1;
  gbConstraints.weightx=100;
  gbLayout.setConstraints(m_RelationNameLab,gbConstraints);
  add(m_RelationNameLab);
  m_RelationNameLab.setBorder(BorderFactory.createEmptyBorder(0,5,0,10));
  lab=new JLabel("Instances:",SwingConstants.RIGHT);
  lab.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.EAST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=1;
  gbConstraints.gridx=0;
  gbLayout.setConstraints(lab,gbConstraints);
  add(lab);
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.WEST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=1;
  gbConstraints.gridx=1;
  gbConstraints.weightx=100;
  gbLayout.setConstraints(m_NumInstancesLab,gbConstraints);
  add(m_NumInstancesLab);
  m_NumInstancesLab.setBorder(BorderFactory.createEmptyBorder(0,5,0,10));
  lab=new JLabel("Attributes:",SwingConstants.RIGHT);
  lab.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.EAST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=0;
  gbConstraints.gridx=2;
  gbLayout.setConstraints(lab,gbConstraints);
  add(lab);
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.WEST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=0;
  gbConstraints.gridx=3;
  gbLayout.setConstraints(m_NumAttributesLab,gbConstraints);
  add(m_NumAttributesLab);
  m_NumAttributesLab.setBorder(BorderFactory.createEmptyBorder(0,5,0,10));
  lab=new JLabel("Sum of weights:",SwingConstants.RIGHT);
  lab.setBorder(BorderFactory.createEmptyBorder(0,10,0,0));
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.EAST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=1;
  gbConstraints.gridx=2;
  gbLayout.setConstraints(lab,gbConstraints);
  add(lab);
  gbConstraints=new GridBagConstraints();
  gbConstraints.anchor=GridBagConstraints.WEST;
  gbConstraints.fill=GridBagConstraints.HORIZONTAL;
  gbConstraints.gridy=1;
  gbConstraints.gridx=3;
  gbLayout.setConstraints(m_sumOfWeightsLab,gbConstraints);
  add(m_sumOfWeightsLab);
  m_sumOfWeightsLab.setBorder(BorderFactory.createEmptyBorder(0,5,0,10));
}

public InstancesSummaryPanel ( ) { GridBagLayout gbLayout = new GridBagLayout ( ) ; setLayout ( gbLayout ) ; JLabel lab = new JLabel ( "Relation:" , SwingConstants . RIGHT ) ; lab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 0 , 0 ) ) ; GridBagConstraints gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . EAST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 0 ; gbConstraints . gridx = 0 ; gbLayout . setConstraints ( lab , gbConstraints ) ; add ( lab ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . WEST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 0 ; gbConstraints . gridx = 1 ; gbConstraints . weightx = 100 ; gbLayout . setConstraints ( m_RelationNameLab , gbConstraints ) ; add ( m_RelationNameLab ) ; m_RelationNameLab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 5 , 0 , 10 ) ) ; lab = new JLabel ( "Instances:" , SwingConstants . RIGHT ) ; lab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 0 , 0 ) ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . EAST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 1 ; gbConstraints . gridx = 0 ; gbLayout . setConstraints ( lab , gbConstraints ) ; add ( lab ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . WEST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 1 ; gbConstraints . gridx = 1 ; gbConstraints . weightx = 100 ; gbLayout . setConstraints ( m_NumInstancesLab , gbConstraints ) ; add ( m_NumInstancesLab ) ; m_NumInstancesLab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 5 , 0 , 10 ) ) ; lab = new JLabel ( "Attributes:" , SwingConstants . RIGHT ) ; lab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 0 , 0 ) ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . EAST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 0 ; gbConstraints . gridx = 2 ; gbLayout . setConstraints ( lab , gbConstraints ) ; add ( lab ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . WEST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 0 ; gbConstraints . gridx = 3 ; gbLayout . setConstraints ( m_NumAttributesLab , gbConstraints ) ; add ( m_NumAttributesLab ) ; m_NumAttributesLab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 5 , 0 , 10 ) ) ; lab = new JLabel ( "Sum of weights:" , SwingConstants . RIGHT ) ; lab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 10 , 0 , 0 ) ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . EAST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 1 ; gbConstraints . gridx = 2 ; gbLayout . setConstraints ( lab , gbConstraints ) ; add ( lab ) ; gbConstraints = new GridBagConstraints ( ) ; gbConstraints . anchor = GridBagConstraints . WEST ; gbConstraints . fill = GridBagConstraints . HORIZONTAL ; gbConstraints . gridy = 1 ; gbConstraints . gridx = 3 ; gbLayout . setConstraints ( m_sumOfWeightsLab , gbConstraints ) ; add ( m_sumOfWeightsLab ) ; m_sumOfWeightsLab . setBorder ( BorderFactory . createEmptyBorder ( 0 , 5 , 0 , 10 ) ) ; }
creates the instances panel with no initial instances .
