View RSS Feed

Java Swing

Internal Frames Performance tip

Rate this Entry
by , 04-26-2012 at 09:55 PM (1469 Views)
When various internal frames are present in a desktop, it might be noticed by the user that they move slowly. This problem could be avoided by using outline dragging. With help of outline dragging, just internal frame’s outline is painted at the current position of mouse while internal frame dragging. Innards of internal frames couldn’t be repainted, at new positions, unless dragging is stopped. Default behavior known as live dragging is to repaint or reposition few or all internal frames in a continuous manner while moving; this could be a real slow thing if various internal frames are present in a desktop.
JDesktopPane method setDragMode* can be used for outline dragging. E.g:
Java Code:
desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);

Submit "Internal Frames Performance tip" to Facebook Submit "Internal Frames Performance tip" to Digg Submit "Internal Frames Performance tip" to del.icio.us Submit "Internal Frames Performance tip" to StumbleUpon Submit "Internal Frames Performance tip" to Google

Comments