java - rowcount in flexTable in GWT -


I'm learning in the first line of the GWT

flexTable Gone, Text Box, AddButton, Remove Button

The addButton 2 line is added to the FactTable withe similar component as before on the event. (Tell, told, text box, addButton, remove button.)

  private button getAddbutton () {addbutton = new button (""); Addbutton.addClickHandler (New ClickHandler) {Public Zero onClick (ClickEvent Event) {int i = flexTable.getRowCount (); println ("I" + i); i ++; flexTable.setWidget (i, 0, getPropertyList () FlexTable.setWidget (i, 1, getConditionList ()); flexTable.setWidget (i, 2, getKeyWord ()); flexTable.setWidget (i, 3, getAddbutton ()); flexTable.setWidget (i, 4, getRemove ()); Remove.setStyleName ("CMIS-button-removeOn"); remove.setTitle ("" + i);}}); Addbutton.setSize ("25px", "25px"); Addbutton.setStyleName ("CMIS-button-couple"); Return addons; }  

  I used to produce 1 of 3 I 5 i7  

Why is ROWCOUNT Growing up to 2, I have added only 4 rows in the colon.

The reason is that flexTable Indexing starts from 0, but if you are increasing the row count then just remove the I ++.


Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -