CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: ImageIcon

  1. #1
    Guest

    ImageIcon

    I am using a JLabel with icon for a background in an application with JDesktopPane; It works fine but the icon is too small for the screen and I need to size it before it becomes part of the JLabel. This cannot be tiled since it is a map.

    Does anyone know of a clever way that I can size it to fit screen size? Resizing help also


  2. #2
    Join Date
    May 1999
    Location
    Pune, MH, India.
    Posts
    453

    Re: ImageIcon

    I don't know how to scale a ImageIcon. But there is a method in 'Image' class called, 'getScaledInstance'. Using this method u might be able to resize the image. ImageIcon provides method for retrieving image object called 'getImage'.

    If u don't get any other solution, u can try combination of above methods for resizing ImageIcon.

    - UnicMan
    http://members.tripod.com/unicman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured