Hello, I have a problem when the scrollpane are too long. Just look at the image
How to make the image stay the same while I scroll down the panel ?
This is part of my code
And this is how I set the background image
I also have tried on my own, two trial.
First, I search wheter I can set the background on the frame instead, and the result is none. It is not possible
Second I tried to make a new panel, and put this as my background panel, and add the scrollpane to this panel (before, I put the scrollpane on the frame). But, the problem comes from the unmoving scrollpane/ Failed
I tried another alternative as to set the layout of this panel as border layout, the scrollpane is working fine, but the background cannot be seen even though I setOpaque(false) this panel.
How are you adding that image to the scroll pane? How are you adding that scroll pane to the frame? Where do all the Japanese→English translations come from?
It is a long code and I do not think that other part of code will affect the solution in any way. In short I use combination of ArrayList<TextArea> for those japanese english translation and ArrayList<JButton> for those delete button. and adding all of them in sequence to the gridpanel.