Java Utililty Methods JDesktopPane

List of utility methods to do JDesktopPane

Description

The list of methods to do JDesktopPane are organized into topic(s).

Method

intarrangeIcons(JDesktopPane desktop)
arrange Icons
int _iconCnt = 0;
JInternalFrame _allFrames[] = desktop.getAllFrames();
for (int _x = 0; _x < _allFrames.length; _x++) {
    if ((_allFrames[_x].isVisible()) && (_allFrames[_x].isIcon())) {
        _iconCnt++;
int _height = desktop.getBounds().height;
...
voidarrangeMinifiedWindows(JDesktopPane desktop)
arrange Minified Windows
List<JInternalFrame> minified = new ArrayList<JInternalFrame>();
JInternalFrame[] frames = desktop.getAllFrames();
for (JInternalFrame frame : frames) {
    if (frame.isIcon()) {
        minified.add(frame);
if (minified.size() > 0) {
...
voidcascade(JDesktopPane desktopPane, int layer)
cascade
JInternalFrame[] frames = desktopPane.getAllFramesInLayer(layer);
if (frames.length == 0) {
    return;
cascade(frames, desktopPane.getBounds(), 24);
voidmakeCenter(JDesktopPane desktop)
make Center
JInternalFrame[] frames = desktop.getAllFrames();
for (JInternalFrame frame : frames) {
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = frame.getSize();
    if (frameSize.height > screenSize.height) {
        frameSize.height = screenSize.height;
    if (frameSize.width > screenSize.width) {
...
voidmoveOff(JDesktopPane desktop)
move Off
JInternalFrame[] frames = desktop.getAllFrames();
for (JInternalFrame frame : frames) {
    BasicInternalFrameUI ui = (BasicInternalFrameUI) frame.getUI();
    Component northPane = ui.getNorthPane();
    Container north = (Container) ui.getNorthPane();
    MouseMotionListener[] motionListeners = (MouseMotionListener[]) northPane
            .getListeners(MouseMotionListener.class);
    for (MouseMotionListener listener : motionListeners) {
...
voidtileHorizontal(JDesktopPane desktop)
tile Horizontal
int _resizableCnt = 0;
JInternalFrame _allFrames[] = desktop.getAllFrames();
for (int _x = 0; _x < _allFrames.length; _x++) {
    JInternalFrame _frame = _allFrames[_x];
    if ((_frame.isVisible()) && (!_frame.isIcon())) {
        if (!_frame.isResizable()) {
            try {
                _frame.setMaximum(false);
...
voidtileVertical(JDesktopPane desktop)
tile Vertical
DesktopManager manager = desktop.getDesktopManager();
if (manager == null) {
    return;
Component[] comps = desktop.getComponents();
Component comp;
int count = 0;
for (int i = 0; i < comps.length; i++) {
...