Hi have try to put the Jpanel, that contains all my components, into a JScrollablePane, in this way:
Nothing is showed...
Joined: Mar 11, 2010
I have read the tutorial: that's what I've learn:
"Here's the code that creates the text area, makes it the scroll pane's client, and adds the scroll pane to a container:"
So, in my case, a Jpanel is the ScrollPane's client.
Than, I have added the scollPane to my container (JFrame)...
Joined: Jun 09, 2003
> JScrollPane scrollPane = new JScrollPane(contentPane);
this is correct
this will never work (it's scrollPane.setViewportView(contentPane) - excuse typos)
this is likely to be the problem:
> The JFrame content pane is a simple JPanel with no layout.
the basics of a scrollpane is that the preferredSize of the component in the viewport
must be bigger than the preferredeSize of the scrollpane - i.e. if the panel has no layout,
then it has no preferredSize = you must set it.