Skip to content
Advertisement

How can I make this JButton visible? When I have progressive scan background JWindow()?

How can I make the JButton visible?

1) When no progressive background is turned on: JButton is showing

enter image description here

2) When no progressive background is turned on, JButton is pressed still showing no flicker:

enter image description here

3) When progressive background is turned on, JButton is invisible and on pressing in this I see flicker and JButton() appears and again hides auto. << Problem is here, so how can I fix it?

enter image description here

JavaScript

Advertisement

Answer

It’s not clear how your video source works, but it appears to be incompatible with Swing due to Mixing Heavyweight and Lightweight Components. Although awt components aren’t transparent, you can always draw your own translucent text on the Frame and do manual hit testing, as suggested below. You might also check to see if your video source API supports Double Buffering and Page Flipping.

enter image description here

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement