1 27 package org.objectweb.clif.console.lib.gui; 28 29 import java.awt.Dimension ; 30 import java.awt.Graphics ; 31 import java.awt.Point ; 32 33 import javax.swing.JDesktopPane ; 34 import javax.swing.JInternalFrame ; 35 36 40 public class ClifDesktopPane extends JDesktopPane { 41 42 private JInternalFrame [] frames; 43 private Point origin; 44 private Dimension dim; 45 46 public ClifDesktopPane() { 47 super(); 48 setDragMode(JDesktopPane.OUTLINE_DRAG_MODE); 49 } 50 51 public void paintComponent(Graphics g) { 52 frames = getAllFrames(); 53 54 for (int i = 0; i < frames.length; i++) { 55 dim = frames[i].getSize(); 56 origin = frames[i].getLocation(); 57 frames[i].reshape(0, origin.y, getWidth(), dim.height); 58 } 59 } 60 61 } | Popular Tags |