GeeCON Prague 2014*
The moose likes Swing / AWT / SWT and the fly likes setBackground().. and Cusor() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "setBackground().. and Cusor()" Watch "setBackground().. and Cusor()" New topic
Author

setBackground().. and Cusor()

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
ok can you change the color of the CROSSHAIR_CUSOR?

and in this code, the setBackground method isnt working...




here is the JFrame()...





thanks,

Justin


You down with OOP? Yeah you know me!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

About the background color.
The parent is responsible for repainting the background but as you are overriding paintComponent, the backgound won't be repainted. You've got to call super.paintComponent(g).


[My Blog]
All roads lead to JavaRanch
 
 
subject: setBackground().. and Cusor()