public void addScreenButtons ( Container parent ) { GridBagLayout gridbag = ( GridBagLayout ) this . getScreenLayout ( ) ; GridBagConstraints c = this . getGBConstraints ( ) ; c . gridheight = GridBagConstraints . REMAINDER ; // end row c . anchor = GridBagConstraints . NORTH ; c . gridwidth = 1 ; // end column ImageIcon icon = BaseApplet . getSharedInstance ( ) . loadImageIcon ( Constants . SUBMIT ) ; JButton button = new JButton ( Constants . SUBMIT , icon ) ; button . setOpaque ( false ) ; button . setName ( Constants . SUBMIT ) ; gridbag . setConstraints ( button , c ) ; parent . add ( button ) ; button . addActionListener ( this ) ; c . gridx = 3 ; // Column 1 c . gridheight = GridBagConstraints . REMAINDER ; // end row c . anchor = GridBagConstraints . NORTH ; icon = BaseApplet . getSharedInstance ( ) . loadImageIcon ( Constants . RESET ) ; button = new JButton ( Constants . RESET , icon ) ; button . setOpaque ( false ) ; button . setName ( Constants . RESET ) ; gridbag . setConstraints ( button , c ) ; parent . add ( button ) ; c . gridheight = 1 ; //Set back button . addActionListener ( this ) ; }
Add a submit and reset buttons to the bottom of the grid .