Questions tagged [scrollpane]

A group that scrolls a child widget using scrollbars and/or mouse or touch dragging.

The widget is sized to its preferred size. If the widget's preferred width or height is less than the size of this scroll pane, it is set to the size of this scroll pane. Scrollbars appear when the widget is larger than the scroll pane.

The scroll pane's preferred size is that of the child widget. At this size, the child widget will not need to scroll, so the scroll pane is typically sized by ignoring the preferred size in one or both directions.

377 questions
56
votes
2 answers

How to resize JavaFX ScrollPane content to fit current size

I have a BorderPane with a ScrollPane as the center element. It resizes automatically to fill the screen. Inside the ScrollPane is a HBox that has no content but is a drag-and-drop target. Therefore I want it to fill its parent ScrollPane. What is…
Lennert
  • 925
  • 1
  • 7
  • 21
15
votes
7 answers

JavaFX ScrollPane border and background

I'm having some problem regarding the default background and border of the ScrollPane. Using this style made the problem clearer to see. setStyle("-fx-background-color:blue; -fx-border-color:crimson;"); I've tried this style and got no luck only…
Nuntipat Narkthong
  • 1,387
  • 2
  • 16
  • 24
14
votes
3 answers

Custom design JScollPane Java Swing

I need to design this scrollbar for all my scrollpanes : With Java Swing. I am using Netbeans IDE. What is the simplest solution ? Thank you very much. Regards
Vincent Roye
  • 2,751
  • 7
  • 33
  • 53
10
votes
3 answers

Zooming in JavaFx: ScrollEvent is consumed when content size exceeds ScrollPane viewport

I have an application that requires zoom inside a ScrollPane, but with my current approach I'm still facing 2 challenges. In order to replicate the problem, I have written a small application ZoomApp that you will find the code for underneath. Its'…
Skjalg
  • 763
  • 5
  • 13
9
votes
4 answers

JavaFx 8 - Scaling / zooming ScrollPane relative to mouse position

I need to zoom in / out on a scroll pane, relative to the mouse position. I currently achieve the zooming functionality by wrapping my content in a Group, and scaling the group itself. I create a new Scale object with a custom pivot. (Pivot is set…
haz
  • 2,034
  • 4
  • 28
  • 52
9
votes
1 answer

JavaFX: Add children to ScrollPane

I have a Pane Object where users can drag and drop various ImageViews. For this, I used pane.getChildren(imageViewObject) method Now, after replacing Pane with ScrollPane, it does not have this method. So I don't know how to get arrount this…
Alex
  • 1,054
  • 6
  • 25
  • 42
9
votes
3 answers

Using libgdx, how can I add both text and images to a ScrollPane?

Here is a code snippet. itemList = new List(skin, "ariel.32.white"); String[] tmpInv = new String[b+1]; tmpInv[0] = ""; a++; for (Entry entry : inventoryItems.entrySet()) { tmpInv[a] = entry.getKey(); a++; …
Sym
  • 187
  • 2
  • 9
8
votes
3 answers

How can I set the unit increment for a scroll pane in JavaFX?

The ScrollBar class in JavaFX contains a property for setting the unit increment, which is what I'm after - however I can't find how to get at this ScrollBar, or set the unit increment some other way from the ScrollPane class! I presume I must be…
Michael Berry
  • 70,193
  • 21
  • 157
  • 216
8
votes
3 answers

JavaFX ScrollPane programmatically moving the viewport - centering content

I can use the setVvalue(double) and setHvalue(double) methods to move a viewport in a JavaFX ScrollPane. What I'm struggling to do is center a particular node in the content of the scroll pane based on its position. I've tried all sorts of combos…
andyw
  • 155
  • 1
  • 2
  • 8
8
votes
1 answer

Java: How to draw non-scrolling overlay over ScrollPane Viewport?

I'd like to use a ScrollPane to display an image in its Viewport, and also have a grid (or box, or any other type of registration/location marker) overlay on the image. I need the overlay to remain fixed when scrolling (meaning the image seems to…
ags
  • 719
  • 7
  • 23
7
votes
3 answers

ScrollPane not showing as needed, FlowPane content

I'm having some difficulty with ScrollPane in JavaFX 8 showing the scrollbar as needed. What I'm currently doing is simply creating a FlowPane with x number of elements, and setting that as the content of the ScrollPane. The problem happens when I…
Mekiah
  • 73
  • 1
  • 6
7
votes
2 answers

ScrollPane JavaFX make it scroll more?

In javaFX scrollpane. It scrolls so slowly.. Any method to boost it up? I've looked all over here, and no luck.. I've found some thread about listview.. Demonstration:
Christian Moen
  • 1,253
  • 2
  • 17
  • 31
7
votes
1 answer

How to create a scrollable panel of components in JavaFX?

So, basically, I'm trying to achieve this a scrollable set of components with spacing etc. and the ability to add more components. The list of components are custom anchorpane components. Here's an example that I got working: The problem is that…
user3530525
  • 691
  • 3
  • 8
  • 20
6
votes
1 answer

Is possible to create horizontal scrolling line chart with a locked y axis on JAVAFX?

I'd like to create horizontal scrolling linechart with a locked y axis on JAVAFX. I have been searching an example or something similar but I did not find anything with JAVAFX. I try to put the linechart into a scrollpane but all is moving right and…
padro
  • 115
  • 1
  • 10
6
votes
2 answers

How to use my trackpad for horizontal mousewheel scrolling in a Java AWT ScrollPane

Like many modern mice and trackpads, my laptop supports vertical and horizontal scrolling. It's an addictive feature once you get used to it. I simply want my Java apps to support horizontal scrolling via the trackpad/mousewheel, but everywhere I…
blissapp
  • 1,330
  • 12
  • 19
1
2 3
25 26