change tr color in Groovy Swing inside panel

User 2235ec4634

02-05-2016 07:17:21

Hi I would like to change color of the whole row in Groovy swing tableLayout? 
How can I modify that code fragment?

tr
(id:'vendors' ){
for (vendor in this.vendorList){
td
{
swing
.checkBox(text:vendor, id:'ChB' + vendor, selected:true);
}
}
}

ChemAxon 26d92e5dcd

02-05-2016 08:50:48

Dear Rafal,


please seeĀ http://user.groovy.codehaus.narkive.com/COHpdOu0/groovy-user-how-to-put-background-color-in-tablelayout.


I suppose you are relying on Groovy SwingBuilder. I would suggest using directly Java's native Swing/AWT components. You can mix Groovy and Java code in your scripts just fine.


https://docs.oracle.com/javase/tutorial/uiswing/components/table.html


Wishing all the best


David