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 GridBagLaout Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "GridBagLaout" Watch "GridBagLaout" New topic
Author

GridBagLaout

P Jain
Ranch Hand

Joined: Jul 31, 2004
Posts: 52
Hi!

I have a JLabel on which I have setted a ImageIcon "a.jpg".
Can I apply GridbagLayout on JLabel or ImageIcon.


I want to change a portion of that Imageicon with another image "b.jpg".


Regards<br />P Jain
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
Would it not be easier to create a third icon file c.jpg which is made from the a.jpg and b.jpg files and then apply that file to the JLabel ?
I have never tried appling a GridBagLayout to JLabel but JLabel does inherit the setLayout method from java.awt.Container, so in theory it is possible.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: GridBagLaout