File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes GridBagLayout background image 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 "GridBagLayout background image" Watch "GridBagLayout background image" New topic
Author

GridBagLayout background image

SteveThompson
Greenhorn

Joined: Apr 05, 2002
Posts: 6
Hi
I have a java application, where I am using GridBagLayout, utilising North, South, East, West and Center.
I would like to insert a background image which will form the backdrop of the whole window, leaving my existing icons, buttons, text boxes
intact in the foreground.
Any ideas, on the best/easiest way?
Thanks
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

The layout doesn't matter... you'll just need to use a subclass of JPanel like the one below...



-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Younes Essouabni
Ranch Hand

Joined: Jan 13, 2002
Posts: 479
Hello,
that's great, I was wondering also how to achieve it. Thx a lot
Another question. With some applications, like winamp3, when you start the application, a picture appears with no frame and disapear once the application has fully started. Do you have an idea on how to achieve it?
Thx in advance
[ April 02, 2003: Message edited by: Younes Essouabni ]

Younes
By constantly trying one ends up succeeding. Thus: the more one fails the more one has a chance to succeed.
padma Doddapaneni
Greenhorn

Joined: Jan 21, 2002
Posts: 5
Using java window class you can acheive this.
SteveThompson
Greenhorn

Joined: Apr 05, 2002
Posts: 6
Thanks very much.
I'll give it a try at the weekend
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: GridBagLayout background image
 
Similar Threads
Image as a background
awt
setting background image in applet
Is this design smart?
window print problem