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
Post a Comment