DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: resize icons to dynamically resize a component

  1. #1
    Join Date
    Mar 2005

    resize icons to dynamically resize a component

    I have to do something like an image editor. You will only drag, rotate and resize the images, nothing related painting or cropping. These images will be selectable so I thought to make images as panel objects. I want jpanels to be resizable dynamically. I was thinking about resize icons at the corners. How would they be implemented? I can make it someway( I can make small panels or buttons in the panel and listen mousedragged events for them) but I want to learn there if there is a standard way to do such a thing.

  2. #2
    Join Date
    Apr 2007
    Sterling Heights, Michigan
    Try overriding the getPreferredSize method of the JPanel to return a different value. Then perhas set or reset the flag in the mouseExited/Entered events and revalidate the container.

Similar Threads

  1. Replies: 0
    Last Post: 01-17-2007, 11:38 PM
  2. Dynamically resize IFrame?
    By Chuck in forum Web
    Replies: 1
    Last Post: 01-31-2003, 03:06 PM
  3. Dynamically resize IFRAME??
    By Ram in forum Web
    Replies: 1
    Last Post: 08-19-2002, 06:18 PM
  4. Replies: 0
    Last Post: 06-08-2002, 02:05 PM
  5. Visual Query Builder: component wish
    By Tim Romano in forum .NET
    Replies: 2
    Last Post: 06-18-2001, 08:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center