001         package com.croftsoft.core.gui;
002    
003         import java.awt.*;
004    
005         import com.croftsoft.core.lang.NullArgumentException;
006    
007         /*********************************************************************
008         * A library of static methods to manipulate Button objects.
009         *
010         * <p>
011         * Java 1.1 compatible.
012         * </p>
013         *
014         * @version
015         *   2001-06-04
016         * @since
017         *   2001-06-04
018         * @author
019         *   <a href="https://www.croftsoft.com/">David W. Croft</a>
020         *********************************************************************/
021    
022         public final class  ButtonLib
023         //////////////////////////////////////////////////////////////////////
024         //////////////////////////////////////////////////////////////////////
025         {
026    
027         public static Button [ ]  createButtonArray ( String [ ]  labels )
028         //////////////////////////////////////////////////////////////////////
029         {
030           NullArgumentException.check ( labels );
031    
032           Button [ ]  buttons = new Button [ labels.length ];
033    
034           for ( int  i = 0; i < labels.length; i++ )
035           {
036             buttons [ i ] = new Button ( labels [ i ] );
037           }
038    
039           return buttons;
040         }
041    
042    
043         //////////////////////////////////////////////////////////////////////
044         //////////////////////////////////////////////////////////////////////
045    
046         private  ButtonLib ( ) { }
047    
048         //////////////////////////////////////////////////////////////////////
049         //////////////////////////////////////////////////////////////////////
050         }