This content has been marked as final. Show 5 replies
tanvir ahmed wrote:You probably want to use a GridPane for this, with one row of Labels for the headers and rows of TextFields below. There's a [url http://docs.oracle.com/javafx/2/layout/builtin_layouts.htm]tutorial for the layout panes.
Pls answer that
I want to create a data entry from which contains a row with 5 columns like this
sr# partyCode partyName particulars amount
Now I want that when i enters values in this row and press enter key then a new row is created automatically and I want sr# value to start from 01 and increase automatically too after every enter key pressing.Just create a controller (see [url http://docs.oracle.com/javafx/2/fxml_get_started/fxml_tutorial_intermediate.htm]this part of the tutorial) and register the appropriate listeners ([url http://docs.oracle.com/javafx/2/events/convenience_methods.htm]tutorial) with your text fields to add new items to the grid pane as necessary.
SceneBuilder is a tool for generating FXML.
FXML can only define a static user interface. Code to change the user interface in response to user input, which is what I assume you mean by "automatic row insertion", must be written in another language (not FXML); this is typically Java code and is placed in the controller. (It's possible to do this using other JVM languages, such as Groovy, but Java is by far the most common.)
So you need to write a controller. Use SceneBuilder to map the fxml file to a controller, and put the code to add new rows into the controller.