(I am using JDK 1.4.0)
I have a JPanel that implements Scrollable and I add it to a JScrollPane. The scroll bars show up and act correctly, however the JPanel's paintComponent(Graphics) method is not being called.
If I take the JScrollPane out of the problem there is no problem. The JPanel's paintComponent method is getting called just fine. If I put my own JScrollBars and implement them they scroll the panel contents just fine. It would be more efficient to use the Scrollable interface and a JScrollPane.
Does anyone know why paintComponent on a JPanel would not be getting called when I added to a JScrollPane?
I have a JPanel that implements Scrollable and I add it to a JScrollPane. The scroll bars show up and act correctly, however the JPanel's paintComponent(Graphics) method is not being called.
If I take the JScrollPane out of the problem there is no problem. The JPanel's paintComponent method is getting called just fine. If I put my own JScrollBars and implement them they scroll the panel contents just fine. It would be more efficient to use the Scrollable interface and a JScrollPane.
Does anyone know why paintComponent on a JPanel would not be getting called when I added to a JScrollPane?