I have a ListView, where i am adding 10 elements. When the Stage is visible , i see all 10 items with a scroolbar. When i drag the ListView's scrollbar thumb, thumb dn't move. But when i click on the downarrow, the thumb moves but the listview become empty or no items are seen. Attached the screen shot and the testcase.
Actually its a two bug, First bug one is thumb can't be moved. Second bug is ListView looks like empty or no items is seen.
TestCase
--------------
package b18;
import java.util.ArrayList;
import javafx.collections.Sequence;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
/**
*
* @author Lawrence PremKumar
*/
public class TestListView1 extends javafx.application.Application{
Stage stage = new Stage();
@Override
public void start(Stage stage){
Group root = new Group();
Scene scene = new Scene(root , 400,400);
Sequence children = root.getChildren();
ListView list = new ListView();
list.setLayoutX(10);
list.setLayoutY(10);
ArrayList listValue = new ArrayList();
for(int i=1;i<=10;i++)
listValue.add("Item # - "+i);
list.setItems(listValue);
stage.setScene(scene);
children.add(list);
stage.setVisible(true);
}
public static void main(String []args){
javafx.application.Launcher.launch(TestListView1.class, args);
}
}
Actually its a two bug, First bug one is thumb can't be moved. Second bug is ListView looks like empty or no items is seen.
TestCase
--------------
package b18;
import java.util.ArrayList;
import javafx.collections.Sequence;
import javafx.scene.Group;
import javafx.scene.Scene;
import javafx.scene.control.ListView;
import javafx.stage.Stage;
/**
*
* @author Lawrence PremKumar
*/
public class TestListView1 extends javafx.application.Application{
Stage stage = new Stage();
@Override
public void start(Stage stage){
Group root = new Group();
Scene scene = new Scene(root , 400,400);
Sequence children = root.getChildren();
ListView list = new ListView();
list.setLayoutX(10);
list.setLayoutY(10);
ArrayList listValue = new ArrayList();
for(int i=1;i<=10;i++)
listValue.add("Item # - "+i);
list.setItems(listValue);
stage.setScene(scene);
children.add(list);
stage.setVisible(true);
}
public static void main(String []args){
javafx.application.Launcher.launch(TestListView1.class, args);
}
}