I want to create a snapshot of my application. I saw that I can call “Component:: createComponentSnapshot()” on my main component. The thing is: I want the snapshot to be at a much smaller size than my actual component size. My component is displayed in full-screen. But the snapshot should only be 200x200 pixels and still contain the entire component.
I want a small snapshot, because taking a snapshot in full-screen resolution does take quite a lot of time. Which is a noticeable delay in the UI.
I saw that createComponentSnapshot has a “scaleFactor”. But it does not seem to scale down the component. Rather is scales down the grabbed area. It seems. Or mabye I am using it wrongly?
I could of course call a “setBounds(smallerBounds)” on my main component, befor taking the snapshot. But that causes flicker, because the component actually resizes, which is visible.
Or maybe there is a way to call setBounds() without triggering a repaint of the component nor of any of its children? That would help too, I think.