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

Label with graphic is blurry after fast scrolling in ScrollPane

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P3 P3
    • tbd
    • 8
    • javafx

      Steps to reproduce:
      1. Build sample bellow
      2. Run sample on Raspberry Pi
      3. Fast scrolling down and up and fast repeat.
      4. Label is blurry and sample application is unresponsive (scrolling none)

      Sample:

      package labeldemojavafx;

      import javafx.application.Application;
      import javafx.scene.Scene;
      import javafx.scene.control.ContentDisplay;
      import javafx.scene.control.Label;
      import javafx.scene.control.ScrollPane;
      import javafx.scene.image.Image;
      import javafx.scene.image.ImageView;
      import javafx.scene.layout.StackPane;
      import javafx.stage.Stage;

      public class LabelDemoJavaFX extends Application {
          
          @Override
          public void start(Stage primaryStage) {
              ScrollPane sp = new ScrollPane();
              sp.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);
              sp.setVmax(50);
              
              Label lbl = new Label();
              lbl.setText("Application");
              lbl.setGraphic(new ImageView(new Image(LabelDemoJavaFX.class.getResource("/Metro-icon.png").toExternalForm())));
              lbl.setGraphicTextGap(0);
              System.out.println("GraphicTextGap: " + lbl.getGraphicTextGap());
              lbl.setContentDisplay(ContentDisplay.TOP);
              
              sp.setContent(lbl);
              
              StackPane root = new StackPane();
              root.getChildren().add(sp);
              
              Scene scene = new Scene(root, 300, 250);
              
              primaryStage.setTitle("Hello World!");
              primaryStage.setScene(scene);
              primaryStage.show();
          }

          public static void main(String[] args) {
              launch(args);
          }
      }

            ddhill David Hill (Inactive)
            ltorokjfx Ladislav Török (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: