A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
Swing / AWT / SWT
Change canvas background colour at button click
Joined: Jun 25, 2012
Jul 03, 2012 00:09:54
I am developing Java
, which have canvas in it.
I want to change background color of canvas at one button click.
i have changed it using
c.offscreen.setColor(back); c.offscreen.fillRect(0, 0, c.getWidth(), c.getHeight()); c.repaint();
but the content of canvas which i have drawn is lost.
How to changed canvas background color of canvas.
Thanks in Advance.
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Change canvas background colour at button click
change back text of button with help of Thread.sleep()
Midlet Colours? (On forms etc..)
JButton is not displaying the background color
How does canvas, an exteded JPanel obj have methods getSize(), createImage(size.width, size.height)?
change text area background color at run time.
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014