Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1725

Using a method to change

From "KDawg44" <kdawg44@THRWHITE.remove-dii-this>
Subject Using a method to change
Message-ID <1180405766.323713.275130@q69g2000hsb.googlegroups.com> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:34 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
Hi,

I have a series of buttons name

btnPXxY where X and Y are numbers ranging from 0 to 10 in a grid of
buttons.  For example, a button name btnP0x0 and another named btnP0x1
etc.

When the buttons are pressed I want to pass integers x and y to a
method.  This method is going to a bunch of things with these numbers
but one thing i would like to do would be to change the color of the
button corresponding to this.

How can I pass the variables x and y into another variable name?  is
this possible?  something along the lines of:

btnP + varX + x + varY. bgcolor = red.

Thanks for any suggestions.  I am HOPING that I do not have to pass
the button object into the function since I will have to change a
bunch of code for these buttons.

Thanks.

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Using a method to change "KDawg44" <kdawg44@THRWHITE.remove-dii-this> - 2011-04-27 15:34 +0000
  Re: Using a method to cha "Brandon McCombs" <brandon.mccombs@THRWHITE.remove-dii-this> - 2011-04-27 15:35 +0000

csiph-web