Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8112095

JavaFX2.0 EA - ListView dn't show any item in it or looks like empty

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • fx2.0
    • fx2.0
    • javafx
    • JavaFX2.0 EA build 18 , Windows Vista Ultimate SP2 and Mac Book Pro. JDK 6.0

      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);
          }

      }

            jgiles Jonathan Giles
            lpremkumajfx Lawrence Premkumar (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: