public GridBagConstraints getGBConstraints ( ) { if ( m_gbconstraints == null ) m_gbconstraints = new GridBagConstraints ( ) ; else { // Set back to default values m_gbconstraints . gridx = GridBagConstraints . RELATIVE ; m_gbconstraints . gridy = GridBagConstraints . RELATIVE ; m_gbconstraints . gridwidth = 1 ; m_gbconstraints . gridheight = 1 ; m_gbconstraints . weightx = 0 ; m_gbconstraints . weighty = 0 ; m_gbconstraints . anchor = GridBagConstraints . CENTER ; m_gbconstraints . fill = GridBagConstraints . NONE ; m_gbconstraints . insets . bottom = 0 ; m_gbconstraints . insets . left = 0 ; m_gbconstraints . insets . right = 0 ; m_gbconstraints . insets . top = 0 ; m_gbconstraints . ipadx = 0 ; m_gbconstraints . ipady = 0 ; } return m_gbconstraints ; }
Get standard GridBagConstraints . The grid bag constrain is reset to the original value in this method .