DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Istanbul
    Posts
    10

    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
    Location
    Sterling Heights, Michigan
    Posts
    8,652
    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.
    I don't answer coding questions via PM or Email. Please post a thread in the appropriate forum section.
    Please use [Code]your code goes in here[/Code] tags when posting code.
    Before posting your question, did you look here?
    Got a question on Linux? Visit our Linux sister site.
    Modifications Required For VB6 Apps To Work On Vista

Similar Threads

  1. Replies: 0
    Last Post: 01-17-2007, 10:38 PM
  2. Dynamically resize IFrame?
    By Chuck in forum Web
    Replies: 1
    Last Post: 01-31-2003, 02: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

Bookmarks

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links