Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Page 2 of 2 FirstFirst 12
Results 26 to 34 of 34

Thread: repaint() event does not work.

  1. #26
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: repaint() event does not work.

    I don't see it in post#23. Where is it? I do NOT find it when I search the posted text.

  2. #27
    Junior Member
    Join Date
    Dec 2011
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: repaint() event does not work.

    I added what you said and now it works but it is opened in a separate window,I need it to work in the window which contains the buttons.

  3. #28
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: repaint() event does not work.

    You should be able to see how drawing works now. You'll have to rewrite your code.

  4. The Following User Says Thank You to Norm For This Useful Post:

    SagiIs (December 25th, 2011)

  5. #29
    Junior Member
    Join Date
    Dec 2011
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: repaint() event does not work.

    I see,thanks a lot man you helped me a lot

  6. #30
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: repaint() event does not work.

    Good luck rewriting the code.

    Try to use Swing classes instead of the older AWT classes you are using.

  7. #31
    Junior Member
    Join Date
    Dec 2011
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: repaint() event does not work.

    I actually ran the code before,my problem is running that code with the buttons.

  8. #32
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: repaint() event does not work.

    Make a SSCCE to show the problem.
    You will probably need separate panels for the buttons and the drawing area.

  9. #33
    Junior Member
    Join Date
    Dec 2011
    Posts
    19
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Re: repaint() event does not work.

    Actually I did,I already showed you the code,I do use a panel for the buttons and a drawing area.

  10. #34
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: repaint() event does not work.

    The code you posted has to be rewritten.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Help with repaint
    By AraHabs in forum AWT / Java Swing
    Replies: 5
    Last Post: November 5th, 2011, 04:40 PM
  2. Drawing a line and repaint()
    By rogerbacon in forum AWT / Java Swing
    Replies: 3
    Last Post: October 19th, 2011, 07:08 PM
  3. My JFrame won't repaint correctly please help me out!
    By ocolegrove in forum What's Wrong With My Code?
    Replies: 2
    Last Post: May 10th, 2011, 10:04 PM
  4. Repaint,
    By Time in forum AWT / Java Swing
    Replies: 3
    Last Post: May 21st, 2010, 11:23 PM
  5. Repaint doesn't repaint?
    By PotataChipz in forum AWT / Java Swing
    Replies: 6
    Last Post: January 18th, 2010, 09:56 PM

Tags for this Thread