0

I want to put an ImageView in the center of a tab (JavaFx), please help me. I use this code to fix margines but ,I can't center the ImageView .

ImageView view = new ImageView();
Tab tab = new Tab("Onglet " + (tabs.getTabs().size() + 1));
tab.setContent(view);
view.setTranslateX(100);
view.setTranslateY(100);

1 Answers1

1

Wrap the ImageView into a layout pane that meets your requirements.

The answers in this question may help you as well.

Community
  • 1
  • 1
Roland
  • 18,114
  • 12
  • 62
  • 93