3

I would like to fit my Two Tabs on TabPane using TabPane.setTabMinWidth() method.

I thought a simple division will solve the problem.

   tabPane.setTabMinWidth(tabPane.getPrefWidth()/2);
   // in this approach TabPane add Menu Button on the right.
   // I also tried to divide my different containers, BorderPane
   // and the Stage.

and then I try another approach which is

  tabPane.setTabMinWidth((tabPane.getPrefWidth()/2) - 20.0);
  // Minus 20.0 leave atleast 10 to 15 pixels (estimated)
  // from last tab index to edge of the stage.
  // Minus 20.0 below will show Menu Button on the right.

How would I fit my Tabs entirely on TabPane?

look something like this: http://www.pinstopin.com/of-login-page-templates-will-help-you-web-app-ui-kit-user-form-/d2ViYnlkemluZSpjb218d3AtY29udGVudHx1cGxvYWRzfDIwMTR8MDN8YXBwX2xvZ2luX2Zvcm1fbWFpbipqcGc_d2ViYnlkemluZSpjb218d2ViLWFwcC1sb2dpbi1wYWdlLXBzZHw/

Orville
  • 518
  • 7
  • 17
  • For one answer you can click [here](https://stackoverflow.com/questions/31051756/javafx-tab-fit-full-size-of-header). – GaborK Apr 02 '19 at 22:03

0 Answers0