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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: fx2.0
    • Fix Version/s: fx2.0
    • Component/s: javafx
    • Environment:

      JavaFX2.0 EA build 18 , Windows Vista Ultimate SP2 and Mac Book Pro. JDK 6.0

      Description

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

      }

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Imported: