Forums Register Login

telling jlabel ignore application repaint

+Pie Number of slices to send: Send
Hello all,


I am hoping you can help me with what I am trying to achieve. I would like to tell a JLabel or subclass thereof not to repaint when the application calls the repaint method. I know you can use setIgnoreRepaint(true); but that only works for OS level calls not from within the application.

Thank you in advance,
Ben
+Pie Number of slices to send: Send
I think you need to explain your requirement better and let us know the reasoning behind it.

What happens if you override repaint() to be a no-op?
+Pie Number of slices to send: Send
Hey thanks for the reply. I can't believe I didn't try that and I was looking at this the completely wrong way! The panel I was adding got repainted OVER the top of the rest and because I didn't set up the sizes properly it paints on top. Sorry for being so daft!
+Pie Number of slices to send: Send
Looks like you need to learn how to use layout managers.
http://download.oracle.com/javase/tutorial/uiswing/layout/index.html
Do not threaten THIS beaver! Not even with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1188 times.
Similar Threads
Problem Repainting Panel
Removing and Adding to a JPanel during Run Time
how to refresh the dispaly in Swing
slight problem using JScrollPane
setting text in a JTextField
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 04:06:27.