swing - How to get colour, font of java table row/cell/text with Jemmy? -


need check colour/font style of java table (text, background) in swing application cause style of row should depend on column value.

styled jtable

it possible colour of font , background of selected (cell/row):

maintable.selectcell(0, 0); string bgcol = maintable.getselectionbackground().tostring();  // => javax.swing.plaf.coloruiresource[r=51,g=153,b=255] string fgcol = maintable.getselectionforeground().tostring();  // => javax.swing.plaf.coloruiresource[r=255,g=255,b=255]     

but selected cell/row has own style of selection, check becomes quite useless.

what way accomplish style checking of cell/row (not selected) jemmy library?

a renderer used paint each cell in table. should able access component used render cell code like:

tablecellrenderer renderer = table.getcellrenderer(row, column); component c = table.preparerenderer(renderer, row, column); system.out.println(c.getbackground()); 

Comments

Popular posts from this blog

PySide and Qt Properties: Connecting signals from Python to QML -

c# - DevExpress.Wpf.Grid.InfiniteGridSizeException was unhandled -

scala - 'wrong top statement declaration' when using slick in IntelliJ -