Okay here is a good one
My applet has a background… and when i put my Jbutton on the applet… I dont see it when the applet is first started. But after mousing over it i see it.
Any reason why this should be happening.
Okay here is a good one
My applet has a background… and when i put my Jbutton on the applet… I dont see it when the applet is first started. But after mousing over it i see it.
Any reason why this should be happening.
Most likely you arent calling repaint after adding the button.
Hmm. I moved the lines where I actually size and position the buttons to my main Paint Method and that solved the On Load issue.
The problem Im having now is that when i click on one of the buttons my jbuttons dissapear and I have mouse over them again.
*clicking on the button runs an action event method that repaints the screen.
Any thoughts on this
Did you override the paint() method and the call repaint from the action event?
try using a Button instead of a JButton
Going back to buttons did work. How do i set an icon or graphic for the button? or is this only accomplished with a JButton.
If you are using JApplet, you need to override paintComponent(), not paint(), to draw a background image. You also have to call super.paintComponent()