0

Hey guys,

I've drawn a grid, and I have a label contatining a picture. Whenever I change the location of this label, the grid dissapears until I resize/move the frame.

Any suggestions on best method to buffer these grid lines?

They aren't going to be moving graphics or anything like that so I'm hoping for the most easiest method.

pseudocode
> draw x line
> draw y line
>set bounds of label to x,y

Any ideas appeciated.

2
Contributors
2
Replies
3
Views
5 Years
Discussion Span
Last Post by StephNicolaou
1

I assume you are drawing the grid in an overridden paintComponent?
After moving the label you should just call repaint() to let Swing know that the container's paintComponent needs to be called a.s.a.p.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.