Skip to content

jotaaloud/overlappingJFrameComponents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Overlapping JFrame components

How to overlapp a JFrame component over Graphics ( Java ) https://github.com/jotaaloud

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

About

How to overlapp a JFrame component over Graphics ( Java )

Topics

Resources

License

Stars

Watchers

Forks

Languages