while loop: keep all values
Hi. I use java swing to make a GUI. I have a while loop that run as long as there is something to read, and creates a JButton in each loop, pluss it incrases a value that will be sent to a file when the user press the button.
while(file is not empty)
let's say there now is 3 buttons on the panel
if (source = button)
send value button_id to another file
but only the last value is remembered, and only the last button created, is remembered, so how can i remember them all, and not only the last one? I donno if i explained propperly, but plz ask if something aint clear (i'm not english, so..:/)
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL