java - How to create independent JPanel-Layers within JFrame and repaint each indiviually -


i'm searching way paint several jcomponents above each other (overlap) , still being able individually access , alter them.

e.g. paint 3 jpanels transparent backgrounds - each containing circle, rectangle or line. afterwards, i'd change appearance of circle. other 2 should not repainted (similarly layers in photoshop).

my current project has jpanel thousands of lines , need change rectangle in on mouseover if redraw complete jpanel each time laggy.

is there decent way accomplish that? thank ideas!

i need change rectangle in

you can invoke:

panel.repaint(rectangle); // or  panel.repaint(x, y, width, height); 

to specify rectangular area repainted.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -