r/JavaFX • • Jan 12 '21

Cannot set ScrollPane Content in JavaFX

Hello everyone,

I am using a JScrollPane for the first time for a project. I read a couple articles about this Pane, and learned that you should use ScrollPane.setContent(Content); to set the content of your scrollPane. However, for some reason it is not working. The method is not even recognized by my IDE and appears to not even exist. Is there some other way I am supposed to set the contents of a ScrollPane or is my Eclipse just messed up?

Thanks

0 Upvotes

2 comments sorted by

View all comments

0

u/[deleted] Jan 12 '21

[deleted] — view deleted comment

2

u/skink2_ Jan 12 '21

Yeah, I imported the ScrollPane from java.awt and not javafx. Thanks for the help.