Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 9th, 2005, 11:02 AM   #1
adh3
Newbie
 
Join Date: Oct 2005
Posts: 6
Rep Power: 0 adh3 is on a distinguished road
Talking setting custom background for a swing window?

Is there any way to do this as i cant find anything on the web? Just using a gif file as the background. Thanks.
adh3 is offline   Reply With Quote
Old Oct 9th, 2005, 11:06 AM   #2
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 5 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
I don't know Java, but i'm sure there are ways to set certain parts of the background different colors... you could read the GIF file yourself (or convert to BMP a much easier, but larger format) and draw it to the background...
__________________

tempest is offline   Reply With Quote
Old Oct 9th, 2005, 11:40 AM   #3
xavier
Professional Programmer
 
xavier's Avatar
 
Join Date: Oct 2004
Location: .ro
Posts: 383
Rep Power: 4 xavier is on a distinguished road
Send a message via Yahoo to xavier
http://forum.java.sun.com/thread.jsp...hreadID=506054

Search through there ... u'll probably find an answere.
__________________
Don't take life too seriously, it's not permanent !
xavier is offline   Reply With Quote
Old Oct 9th, 2005, 11:54 AM   #4
adh3
Newbie
 
Join Date: Oct 2005
Posts: 6
Rep Power: 0 adh3 is on a distinguished road
Quote:
Originally Posted by tempest
I don't know Java, but i'm sure there are ways to set certain parts of the background different colors... you could read the GIF file yourself (or convert to BMP a much easier, but larger format) and draw it to the background...

java doesnt seem to like bitmaps, i dont want to set certain parts to certain colours, i just want one gif as a background, sounds simple but java being java- it isnt!
adh3 is offline   Reply With Quote
Old Oct 10th, 2005, 12:00 PM   #5
swmk
Newbie
 
Join Date: Oct 2005
Posts: 19
Rep Power: 0 swmk is on a distinguished road
How about using another JPanel with the gif and put it to the JFrame with BorderLayout?


Hope this meets your requirements.

Regards;
Stephen
swmk is offline   Reply With Quote
Old Oct 12th, 2005, 6:24 AM   #6
adh3
Newbie
 
Join Date: Oct 2005
Posts: 6
Rep Power: 0 adh3 is on a distinguished road
yes but then would you be able to say, create a border layout say of other images or jbuttons and effectively drawing them over that Jpanel and thus creating a background effect?
adh3 is offline   Reply With Quote
Old Oct 14th, 2005, 3:27 AM   #7
swmk
Newbie
 
Join Date: Oct 2005
Posts: 19
Rep Power: 0 swmk is on a distinguished road
How about using GlassLayout????. Many splash are done like that. I'm not sure what will happen when you put too many components.

Regards;
Stephen
swmk is offline   Reply With Quote
Old Oct 15th, 2005, 10:34 AM   #8
Mjordan2nd
The Supreme Ruler
 
Join Date: May 2004
Location: Houston
Posts: 1,476
Rep Power: 6 Mjordan2nd is on a distinguished road
Could you not just paint it as an image?
__________________
"Every gun that is made, every warship launched, every rocket signifies, in the final sense, a theft from those who hunger and are not fed, from those who are cold and are not clothed. The world in arms is not spending money alone. It is spending the sweat of its laborers, the genius of its scientists, the hopes of its children." - Dwight D. Eisenhower
Mjordan2nd is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:11 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC