Results 1 to 2 of 2
  1. #1
    jspexception is offline Member
    Join Date
    Jan 2012
    Posts
    27
    Rep Power
    0

    Default To fix Boundary For Jpanel???

    Creates some paint type of application!!

    i used JPanel for sketch!!

    when i set some image on Jpanel n when i move that image it goes out of Jpanel when it drag to JPanel Boundaries !!



    What to do ?? i want that in Jpanel not out of Jpanel!!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    12,999
    Blog Entries
    7
    Rep Power
    19

    Default Re: To fix Boundary For Jpanel???

    Why all the exclamation marks? Your image goes out of the JPanel boundaries because you didn't tell it to scale itself when needed; read the API documentation for the Graphics class to see how to scale an Image.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Change JPanel text of Parent JPanel from JDialog
    By bikashlama in forum AWT / Swing
    Replies: 7
    Last Post: 12-09-2011, 03:47 AM
  2. tetris type game--- boundary help
    By ftrengnr in forum New To Java
    Replies: 11
    Last Post: 11-09-2010, 10:00 PM
  3. how to get mime boundary
    By chotto in forum Advanced Java
    Replies: 1
    Last Post: 10-20-2010, 04:59 PM
  4. Replies: 1
    Last Post: 03-05-2010, 02:05 AM
  5. Creating a boundary line in java
    By Riz in forum New To Java
    Replies: 2
    Last Post: 09-03-2009, 12:54 AM

Posting Permissions

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