Note that there are some explanatory texts on larger screens.

plurals
  1. POMoving a component out of ScrollPane - JavaFX
    primarykey
    data
    text
    <p>I ask for your help because I have a problem with a ScrollPane in JavaFX.</p> <p>I added a Group into the scrollPane, added the scrollpane to the Scene and finally put it into a JFXPanel because I use it in a Swing application and it's working well, next I added components into the Group (by components I mean an assembly of Nodes like Rectangles, etc ...). That works well, but when I want to move a component out of the scrollpane layout, the movement of the components is uncontrollable, it starts moving really fast and I don't understand why. It starts troubling just when the border of the component touch the border of the scrollpane layout. I tried to use ScrollBar instead but it seems that the ScrollPane is the most suitable object for this.</p> <p>There is the code I used to create my view :</p> <pre><code>public void createView() { this.architectureJFXPanel = new JFXPanel(); this.group = new Group(); this.scrollPane = new ScrollPane(); this.scrollPane.setContent(group); this.scrollPane.setOnKeyPressed(new KeyPressed()); Platform.runLater(new Runnable() { @Override public void run() { Scene scene = new Scene(scrollPane, Color.WHITE); architectureJFXPanel.setScene(scene); } }); } </code></pre> <p>To put the components into the view I use <code>group.getChildren.add()</code> and after that I put the JFXPanel into the swing application.</p> <p>Here is an example of what I'm trying to do. You can see that on the picture I try to move the component out of the layout:</p> <p><img src="https://i.stack.imgur.com/hFrQP.jpg" alt="enter image description here"></p> <p>So if someone already had this kind of problem and could help me I would be really greatful :) Ask me if you need more informations to understand where is the problem.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload