Results 1 to 2 of 2
Thread: Set the background in Java
- 08-06-2007, 05:19 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
- 08-07-2007, 07:13 AM #2
Member
- Join Date
- Jul 2007
- Posts
- 40
- Rep Power
- 0
.bmp bitmaps should not be used in Java. JPEG and GIF are the standards. You could simply draw the image in the paint method of your applet or another component.
Java Code:public void paint(Graphics g) { super.paint(g); Image im = getImage(getDocumentBase(), "myfile.gif"); g.drawImage(im, 0, 0, getSize().width, getSize().height, this); }
Similar Threads
-
Center background image
By Floetic in forum AWT / SwingReplies: 1Last Post: 04-24-2008, 05:50 PM -
window background color?
By javan00b in forum New To JavaReplies: 3Last Post: 01-29-2008, 10:43 AM -
Background image in java
By toby in forum AWT / SwingReplies: 1Last Post: 07-29-2007, 07:15 AM -
Why this image background is black ?
By samson in forum Java 2DReplies: 1Last Post: 07-17-2007, 04:24 AM -
Problem Setting offscreen background
By D34N0 in forum Java AppletsReplies: 1Last Post: 07-14-2007, 11:46 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks