Two Laptop Bag*
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 14687
    
  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
 
Consider Paul's rocket mass heater.
 
subject: setBackground().. and Cusor()
 
Similar Threads
Graphics and JVMs
Finishing touches to a Hangman game: kindly asking for ideas to help debug my logical errors
board not Drawing...
Newbie in need of help
GUI