0

I'm migrating my application from Java 1.7 to Java 11. My application uses JavaFX. During the migration, I see that classes like TooltipBuilder, GridPaneBuilder, CircleBuilder or TextBuilder are not existing anymore. Can we find it in JDK11 anyway? What is the best thing to do to replace it ?

Norcino
  • 5,850
  • 6
  • 25
  • 42
pacataque
  • 130
  • 12
  • The builders were deprecated and mostly removed (except for a few internal implementations) due to problems with their design. What is your use case? How you were using them may dictate the best replacement. – Slaw Sep 19 '19 at 07:43
  • Thank you for your answer ! I mostly use the create() and build() function, in order to create new instances, but I'm not sure to answer your question... – pacataque Sep 19 '19 at 07:53
  • 2
    You should simply instantiate the objects via their constructors instead. You would then perform any necessary configuration, such as setting the font of a label, on the newly created instances. – Slaw Sep 19 '19 at 07:58
  • Ok perfect ! Thank you very munch for the advice ! :) – pacataque Sep 19 '19 at 08:00

0 Answers0