rainypickles
Senior member
hi
i am working on an application. it opens a JFrame and i put a JPanel on the frame. i set the panel layout to null and put classes (extended from canvas) all over the place. i made it so that pressing the arrow keys will cause one canvas to move around. all that works fine.
i tried adding JCheckBoxes to the panel. i add them, and they appear when i mouse over them. when i move my canvas over them, they disappear and dont get redrawn. i changed to Checkboxes (older awt) and this problem does not occur.
then i tried adding a JProgressBar on there and had the same problem. since the old awt didnt have progress bar, i want to use JProgressBar. (i dont want to code my own bar; but maybe itll be easy anyway).
so, how do i make the swing components redraw themselves? there had better be an easy way. is there a paintAllComponents method? i dont think i saw it.
thanks.
i am working on an application. it opens a JFrame and i put a JPanel on the frame. i set the panel layout to null and put classes (extended from canvas) all over the place. i made it so that pressing the arrow keys will cause one canvas to move around. all that works fine.
i tried adding JCheckBoxes to the panel. i add them, and they appear when i mouse over them. when i move my canvas over them, they disappear and dont get redrawn. i changed to Checkboxes (older awt) and this problem does not occur.
then i tried adding a JProgressBar on there and had the same problem. since the old awt didnt have progress bar, i want to use JProgressBar. (i dont want to code my own bar; but maybe itll be easy anyway).
so, how do i make the swing components redraw themselves? there had better be an easy way. is there a paintAllComponents method? i dont think i saw it.
thanks.