// Set spacing between the buttons
playback.setSpacing(true);
// Volume controls
Button mute = new NativeButton("mute");
Slider vol = new Slider();
vol.setOrientation(SliderOrientation.HORIZONTAL);
vol.setWidth("100px");
Button max = new NativeButton("max");
volume.addComponent(mute);
volume.addComponent(vol);
volume.addComponent(max);
// Status area
status.setWidth("80%");
status.setSpacing(true);
Button toggleVisualization = new NativeButton("Mode");
Label timeFromStart = new Label("0:00");
// We'll need another layout to show currently playing track and
// progress
VerticalLayout trackDetails = new VerticalLayout();
trackDetails.setWidth("100%");
Label track = new Label("Track Name");
Label album = new Label("Album Name - Artist");
track.setWidth(null);
album.setWidth(null);
Slider progress = new Slider();
progress.setOrientation(SliderOrientation.HORIZONTAL);
progress.setWidth("100%");
trackDetails.addComponent(track);
trackDetails.addComponent(album);
trackDetails.addComponent(progress);
trackDetails.setComponentAlignment(track, Alignment.TOP_CENTER);
trackDetails.setComponentAlignment(album, Alignment.TOP_CENTER);