🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #19719

Re: Array of Buttons

#19719
From: gman1
Date: Tue, 06 Jan 1998 00:00
43 lines
1532 bytes
I got this example to work 2 dimensionaly, but don't understand either?
Can this example work 1 dimensionally?  Someone please explain this
further....

Eric Nagler wrote:

> But why is a 2-dimensional array needed? What's wrong with this?
>
> import java.awt.*;
> public class Main
> {
>   private static final int SIZE = 3;
>   public static void main(String args[])
>   {
>     Button[] butt = new Button[SIZE];
>     for(int i = 0; i < SIZE; ++i)
>       butt[i] = new Button();
>   }
> }
>
> On Thu, 18 Dec 1997 12:05:54 -0700, cmm <cmavros@dmwgroup.com> wrote:
>
> >  Button [][] datebuttons;
> >
> >init(){
> >  datebuttons = new Button [7][7];
> >    for (int i=0;i<7;i++){
> >      for (int j=0;j<7;j++){
> >        datebuttons[i][j]= new Button();
> >       }
> >    }
> >}
> >
> >
> >cmm wrote:
> >
> >> Is it possible to have an array of buttons? Examples?
> >>
> >> CMM
> >
> >
> >
Technical Details
Message-ID: <34B2C78D.5DE8DCD@enter.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34996C26.AD9BFFA@dmwgroup.com> <34997412.3981F484@dmwgroup.com> <34a36507.35514175@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,901088dcdfd2f2a4
X-Google-Attributes: gidf74b3,public
From: gman1 <gman1@enter.net>
Subject: Re: Array of Buttons
Date: 1998/01/06
Message-ID: <34B2C78D.5DE8DCD@enter.net>
X-Deja-AN: 313449018
Content-Transfer-Encoding: 7bit
References: <34996C26.AD9BFFA@dmwgroup.com> <34997412.3981F484@dmwgroup.com> <34a36507.35514175@forums.borland.com>
To: Eric Nagler <76711.521@compuserve.com>
Content-Type: text/plain; charset=us-ascii
Organization: None
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language