Skip to content

Instantly share code, notes, and snippets.

@bekwam
Created November 5, 2016 21:45
Show Gist options
  • Save bekwam/6c0ea2b834a89e06c2b1ca26b459ae5c to your computer and use it in GitHub Desktop.
Save bekwam/6c0ea2b834a89e06c2b1ca26b459ae5c to your computer and use it in GitHub Desktop.
Convert ArrayList of String to List of JavaFX Labels
List<String> list = new ArrayList<>();
list.add( "a" );
list.add( "b" );
list.add( "c" );
List<Label> labels = list
.stream()
.map( Label::new )
.collect(Collectors.toList());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment