0
Tip_percentslider = new Slider();
   Tip_percentslider.setMin(0);
   Tip_percentslider.setMax(25);
   Tip_percentslider.setValue(15);
   Tip_percentslider.setShowTickLabels(true);
   Tip_percentslider.setShowTickMarks(false);
   Tip_percentslider.setSnapToTicks (true);
   Tip_percentslider.setMajorTickUnit(5);
   Tip_percentslider.setMinorTickCount(4);
   Tip_percentslider.setBlockIncrement(1);
   Tip_percentslider.valueProperty().addListener(
    (observable, oldvalue, newvalue) ->
    {           
      Tip_percentsliderlabel.setText(String.format("Tip Percent: %2d%s",newvalue.intValue(),"%"));
    } );

This is the slider I created.

Split_Box = new ChoiceBox(FXCollections.observableArrayList(
"1 Way", "2 Ways", "3 Ways", "4 Ways", "5 Ways") );
   Split_Box.setMaxWidth(Double.MAX_VALUE);
   Split_Box.setValue ("1 Way");

This is the choice box i created.

I need to turn them both to Integers and be able to calculate them to print into text fields.

Till3r
  • 1
  • 3
    Just cast `Tip_percentslider.getValue()` to an `int`. For the choice box, why not start with a `ChoiceBox` in the first place? (Aside: please use [proper naming conventions](https://en.wikipedia.org/wiki/Naming_convention_(programming)#Java).) – James_D Oct 25 '17 at 00:41
  • 1
    You might also study this related [example](https://stackoverflow.com/a/31909942/230513). – trashgod Oct 25 '17 at 03:05

0 Answers0