wood burning stoves*
The moose likes Swing / AWT / SWT and the fly likes how to show image all over the dialog 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 "how to show image all over the dialog" Watch "how to show image all over the dialog" New topic

how to show image all over the dialog

swapnel surade
Ranch Hand

Joined: Mar 05, 2009
Posts: 129

I have a dialog its having flowlayout. On that dialog I hve added a panel which is also having flow layout.

I have displayed a image on the panel, but its not occupying the whole screen. its gettting applied only to the center of the dialog.

I want to show that image all over the screen... how I can do that

Rob Camick
Ranch Hand

Joined: Jun 13, 2009
Posts: 2152
You need to scale the image to cover the entire space available. Using a FlowLayout is not the way to go since a FlowLayout always uses the preferred size of the component. So you should probably be using a BorderLayout. You can then add your image to the Background Panel.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: how to show image all over the dialog
Similar Threads
JTextField not updated from dialog box.
problem in layout
GUI Design Considerations
Image related
Image that Fits