Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

textarea array value stored in another array

 
Dave Kairys
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using a TextArea array to store various values. The program is basically booking a room. When one room is booked, the background color changes and some text appears. It then needs to move to the next room. I can get the color and the text to appear, but I can't get it to move to the next room. I have an array for the 'next room' that is set to true(from false) when the color and text appear for the booking of the first room. I am also using JRadioButtons. Here is some code:

if (rweak.isSelected()) {
for (int b = 1; b < 4; b++){
LowGravity[b].setBackground(lightRed);
LowGravity[b].setText(LowGravity[b].getText() + " " + maltedbeverage.getSelectedItem() + "\nkegs of " + lengthTF.getText());
brewed[b] = true;//garden is occupied
if (brewed[b] = true) {
LowGravity[b].setBackground(lightRed);
}//closes inner if
break;
}//closes for loop
}//closes if
Any suggestions?
Thanks!
I do realize that this is a SWING topic. I also posted it there as well.
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Duplicate Post
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic