Re: Thinlet GUI toolkit question
- From: Ian Shef <invalid@xxxxxxxxxxxxx>
- Date: Mon, 01 May 2006 20:28:58 GMT
"Sundar The Great" <sundar22in@xxxxxxxxx> wrote in
news:1146115764.983821.109430@xxxxxxxxxxxxxxxxxxxxxxxxxxxx:
<snip>
Now i have one more question. Since iam using Thinlet GUI tool kit, im
unable to load an image at the background of the applet. My question is
how to add an image at the background of the applet and also how to add
an image anywhere we want?
I am no Thinlet expert, but...
Thinlet extends Container which extends Component (which
extends Object).
Applet extends Panel which extends Container which extends Component (which
extends Object).
In AWT, you can either:
1) Define a custom Component that draws an image, and add it to a Container
(which could be and Applet or anything else that inherits from Container),
OR
2) In your applet, override the method paint(Graphics g) to draw an image.
The image should be initialized elsewhere (say, during applet
initialization), and copied (say, with drawImage) when paint is called.
Don't neglect to call super(g) to ensure that the overriden paint method also
gets a chance to do its work.
This is basic stuff for AWT. Perhaps Thinlet provides an easier way, but i
don't know what it is.
--
Ian Shef 805/F6 * These are my personal opinions
Raytheon Company * and not those of my employer.
PO Box 11337 *
Tucson, AZ 85734-1337 *
.
- Prev by Date: Re: help needed @ JScrollpane on JTabbedpane
- Next by Date: JSpinner and date / time
- Previous by thread: help needed @ JScrollpane on JTabbedpane
- Next by thread: JSpinner and date / time
- Index(es):
Relevant Pages
|