Results 1 to 3 of 3
  1. #1
    happy_hippie is offline Member
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Default Custom component and paint outside of bounds

    Hey

    I have created a custom component which can be scaled and rotated, and that is working.
    But my problem is that the rotated bounds might be different from the component.
    Example, I have rotated the component so the rotated bounds is -10 in X and -3 in Y and is +23 in width and +4 in height. If I then move the component so the original Y is below the visible field of the parent, the component is not displayed. I have tried to make a custom repaintmanager, but it did not work.
    Does anyone know which class I must extend to allow my component to still be visible if the transformed bounds is still visible?

  2. #2
    happy_hippie is offline Member
    Join Date
    Sep 2009
    Posts
    6
    Rep Power
    0

    Default

    It looked like it was in the paintchildren method and I could not get it working, so I decided to use afffinetransform instead, as I use it for rotating the component and it worked.
    Case closed

  3. #3
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. array going out of bounds?
    By jabo in forum New To Java
    Replies: 9
    Last Post: 04-02-2010, 11:08 AM
  2. Array Index out of bounds
    By leapinlizard in forum New To Java
    Replies: 5
    Last Post: 04-29-2009, 06:11 AM
  3. Custom painter for standard component
    By spike in forum AWT / Swing
    Replies: 1
    Last Post: 10-04-2008, 06:06 PM
  4. why is my array out of bounds?
    By Phobos0001 in forum New To Java
    Replies: 3
    Last Post: 03-24-2008, 02:20 AM
  5. Help with custom component
    By Falcon1 in forum AWT / Swing
    Replies: 8
    Last Post: 07-21-2007, 01:39 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
  •