private void initButtons ( ) { // the buttons for the search form bSearchRow = new Button ( "Search Rows" ) ; bNewRow = new Button ( "Insert New Row" ) ; bSearchRow . addActionListener ( this ) ; bNewRow . addActionListener ( this ) ; pSearchButs = new Panel ( ) ; pSearchButs . setLayout ( new GridLayout ( 1 , 0 , 4 , 4 ) ) ; pSearchButs . add ( bSearchRow ) ; pSearchButs . add ( bNewRow ) ; // the buttons for editing a row bCancel1 = new Button ( "Cancel" ) ; bPrev = new Button ( "Prev" ) ; bNext = new Button ( "Next" ) ; bDelete = new Button ( "Delete" ) ; lastButtonDelete = false ; bNewSearch = new Button ( "Search" ) ; bCancel1 . addActionListener ( this ) ; bPrev . addActionListener ( this ) ; bNext . addActionListener ( this ) ; bDelete . addActionListener ( this ) ; bNewSearch . addActionListener ( this ) ; pEditButs = new Panel ( ) ; pEditButs . setLayout ( new GridLayout ( 1 , 0 , 4 , 4 ) ) ; pEditButs . add ( bCancel1 ) ; pEditButs . add ( bPrev ) ; pEditButs . add ( bNext ) ; pEditButs . add ( bDelete ) ; pEditButs . add ( bNewSearch ) ; // the buttons for inserting a new row pInsertButs = new Panel ( ) ; pInsertButs . setLayout ( new GridLayout ( 1 , 0 , 4 , 4 ) ) ; bCancel2 = new Button ( "Cancel Insert" ) ; bNewInsert = new Button ( "New Insert" ) ; bNewSearch1 = new Button ( "Search" ) ; bCancel2 . addActionListener ( this ) ; bNewInsert . addActionListener ( this ) ; bNewSearch1 . addActionListener ( this ) ; pInsertButs . add ( bCancel2 ) ; pInsertButs . add ( bNewInsert ) ; pInsertButs . add ( bNewSearch1 ) ; }
init the three boxes for buttons