Ugh. Please don't attempt to cache or track
your GraphicsConfiguration.
It will be updated for you when the window is moved.
You are supposed to retrieve it every time from the
component.
The test I sent the other day was just an illustration and
quick verification test, not really to be used in production.
Thanks,
Dmitri
[EMAIL PROTECTED] wrote:
Hi Mark,
Because our software is a huge project with many packages, it is not that easy . . .
The graphic I'am talking about is nested in one of our own dialog classes. This
dialog can be made of of different container types. In my case this type is a
JFrame. So i added this code to the constructor of this dialog:
gc = this.getView().getGraphicsConfiguration();
this.getView().addComponentListener(new ComponentAdapter()
{
public void componentMoved(ComponentEvent e)
{
if (e.getComponent().getGraphicsConfiguration() != gc)
{
System.out.println("Moved!!");
gc = e.getComponent().getGraphicsConfiguration();
controlPanel.getDisplayPanel().setGraphicsConfiguration(gc);
}
}
});
The line "controlPanel.getDisplayPanel().setGraphicsConfiguration(gc);" sets the current graphics configuration in my displayPanel where the VolatileImage is actually rendered.
This attempt works as good (or bad) as the checking for the current graphics configuration directly in the displayPanel object. . . .
Maik
(besides, can someone tell me what code tags I have to use in this forum?)
[Message sent by forum member 'kiamur' (kiamur)]
http://forums.java.net/jive/thread.jspa?messageID=292252
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".