https://github.com/jotaaloud/overlappingjframecomponents
How to overlapp a JFrame component over Graphics ( Java )
https://github.com/jotaaloud/overlappingjframecomponents
color components java jframe tutorial
Last synced: 11 months ago
JSON representation
How to overlapp a JFrame component over Graphics ( Java )
- Host: GitHub
- URL: https://github.com/jotaaloud/overlappingjframecomponents
- Owner: jotaaloud
- License: unlicense
- Created: 2024-04-18T16:51:14.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-28T09:37:51.000Z (about 1 year ago)
- Last Synced: 2025-01-28T00:38:46.896Z (about 1 year ago)
- Topics: color, components, java, jframe, tutorial
- Language: Java
- Homepage:
- Size: 50.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Overlapping JFrame components
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.
1. Add the JFrame elements
2. Add the Graphics g function and its components
3. Write the 'setBounds' and add the JFrame components AFTER the graphics. You have to do this step INSIDE the Graphics function