Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java

How to change appearence Pane setings in JavaFX

In the course of JavaFX we've learned how to exchange data between View and Model, but we dealed with hardcoded Pane properties(GridPane 10*10). In the application I currently try to code i need to add lines with content when pressing button. We've learned how to replace content but how I can change it. The task is - when i press the button above it a new row should form(below other content that is above - i.e. it should be inserted) - the only way i see it now is to prepare all possible layouts and make them visible or not - but I do not no how many times i will need to click button so it is possible that i will need to insert 5 or 10 lines - so it will be a great deal of naming and code duplication. I tried like with text field in Sup app
GridPane.rowIndex="${controller.rowIndex}" In controller created a method public Integer getRowIndex(){ Integer row = 0; return row; } But it does not work.