Results 1 to 2 of 2
Thread: how to set image to a jpanel
- 03-02-2009, 05:08 AM #1
Member
- Join Date
- Nov 2008
- Posts
- 21
- Rep Power
- 0
how to set image to a jpanel
i have a swing application where i have to load an image and do some annotations on it. the application contains two toolbars. one toolbar contains buttons such as loading an image,zoom in,zoom out etc. other toolbar contains buttons such as drawing circles,rectangles on the image. so what i did is i have added these two toolbars to two separate panels and added it to frame. first frame as horizontal panel and added to the north of frame and second toolbar as vertical panel added to the west. now i declared the remaining part of the frame as third panel where the actual image is seen and can be modified. my problem is if the image is small it is showing the image in the center and if the image is big it is added with the scrollbar which i provided. i want to change the size of this panel whenever i add an image to this panel either a big image or a small. i mean i want to assign the size of the image to the size of the panel. hope you understand my problem...........i cannot load the code as it is huge one.
- 03-02-2009, 08:36 AM #2
Similar Threads
-
[SOLVED] manipulating the pixel values of an image and constructinf a new image from
By sruthi_2009 in forum AWT / SwingReplies: 14Last Post: 04-10-2009, 08:46 AM -
Canvas Image popups another image (SWT)
By SpaceY in forum New To JavaReplies: 2Last Post: 11-11-2008, 01:25 PM -
n00b : Ghost image while using mouseDragged event to move a filled jPanel
By ankitmcgill in forum New To JavaReplies: 5Last Post: 11-02-2008, 06:41 AM -
drawing an image to an offscreen image
By hunterbdb in forum Java 2DReplies: 9Last Post: 10-30-2008, 06:17 PM -
Converting multiple banded image into single banded image... Image enhancement
By archanajathan in forum Advanced JavaReplies: 0Last Post: 01-08-2008, 05:29 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks