How to overlapp a JFrame component over Graphics ( Java )
I was having trouble trying to paint a JLabel/JButton(Java.awt.*) over a Rect(java.awt.Graphics), to change the color of the Rect or to add new Polygons.
This is a repo to explain with a few words how to fix it.
- Add the JFrame elements
- Add the Graphics g function and its components
- Write the 'setBounds' and add the JFrame components AFTER the graphics. You have to do this step INSIDE the Graphics function