CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2000
    Location
    Adelaide, Australia
    Posts
    2

    Help needed refreshing graphical panels

    I've tried posting this question to aus.computers.java and comp.lang.java.help without any success, so I was hoping someone could help me out here.

    I have an applet that has a frame, splitpanel and 2 BevelPanels (using Borland JBuilder2). One of these panels contains other panels which I wish to be able to move around via the mouse. I've added a mouse listener to the parent panel to those I wish to move around and made a call to setLocation for the child panel and set its location to that of the mouse (on the mousedrag event).

    The problem is that it doesn't update the view unless I alt+tab away from netscape and alt+tab back, which must force a refresh of all components. I've tried adding explicit calls to repaint(), update() and validate() to the parent panel and the child panel in the mousedragged method without any luck.

    Any help/suggestions?? Please email posts to nmilne@senet.com.au.

    Thanks in advance,

    Neil.


  2. #2
    Join Date
    Dec 1999
    Posts
    6

    Re: Help needed refreshing graphical panels

    Hi,

    suppose your parent frame is parFrame.

    parFrame.paintAll(parFrame.getGraphics());
    This will repaint the parent panel. If some thing else is left unrepainted you say the same to that panel or frame.

    this will help you. I could suceed by this with frames

    bye bye
    Ramachandra Rao Yerneni
    rcyerneni@apexmail.com




Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured