focusing and following an object in a swing JPanel
i want to focus and keep following a moving object(an image or drawn shape) which is inside a JPanel.tried using开发者_JS百科 JScrollPanes but could not get the scroll pane to follow the object when it goes out of the view-able frame.
thanx.
panel.scrollRectToVisible(...);
精彩评论