Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947143
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:39:22+00:00 2026-05-27T13:39:22+00:00

I have a main frame and a attached collapsible panel that i got from

  • 0

I have a main frame and a attached collapsible panel that i got from http://sourceforge.net/apps/wordpress/miasct/2009/03/29/external-collapsible-panel/.
The problem is collapsible panel creates undecorated frame that extends JFrame (actually JXFrame from SwingX) and behaves like one.

  1. How do i get rid of this:

enter image description here

  1. Dont show it in alt+tab thingy
  2. When i use “minimize all windows” in WindowsOS and then maximize main frame, attached frame stays iconified.

Here’s a code for it:

import com.sun.jna.platform.WindowUtils;
import java.awt.Point;
import java.awt.Shape;

import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
import java.awt.geom.Ellipse2D;
import java.awt.geom.RoundRectangle2D;
import javax.swing.JFrame;

import org.jdesktop.swingx.JXFrame;
import ui.MainFrame;



/**
 * CollapsibleFrame
 *
 * @author Devon Bryant
 * @since Mar 26, 2009
 */
@SuppressWarnings("serial")
public class CollapsibleFrame extends JXFrame implements ICollapsibleFrame
{
    // The parent frame to tie this frame to
    private JFrame parentFrame = null;

    // Orientation (where the collapsible frame is located relative to the parent frame)
    private Orientation orientation = null;

    /**
     * Constructor
     * @param inName the frame name
     * @param inParentFrame the parent frame to tie this frame to
     * @param the orientation (where in respect to the parent frame to attach to)
     */
    public CollapsibleFrame(String inName, JFrame inParentFrame, Orientation inOrientation)
    {
        super(inName);

        parentFrame = inParentFrame;
        orientation = inOrientation;
                setUndecorated(true);          
    }

    /* (non-Javadoc)
     * @see com.mia.sct.view.panel.ICollapsibleFrame#relocate()
     */
    @Override
    public void relocate()
    {
        offset(0, 0);
    }

    /* (non-Javadoc)
     * @see com.mia.sct.view.panel.ICollapsibleFrame#offset(int, int)
     */
    @Override
    public void offset(int inX, int inY)
    {
        if ((parentFrame != null && parentFrame.isVisible()))
        {
            Point p = null;
            int x = 0;
            int y = 0;

            // Calculate the new x,y coordinates for this frame based on the parents location
            switch (orientation)
            {
                case TOP:
                    p = parentFrame.getLocationOnScreen();
                    x = p.x;
                    y = p.y - getHeight();
                    break;

                case BOTTOM:
                    p = parentFrame.getLocationOnScreen();
                    x = p.x;
                    y = p.y + parentFrame.getHeight();
                    break;

                case LEFT:
                    p = parentFrame.getLocationOnScreen();
                    x = p.x - getWidth();
                    y = parentFrame.getContentPane().getLocationOnScreen().y;
                    break;

                case RIGHT:
                    p = parentFrame.getLocationOnScreen();
                    x = p.x + parentFrame.getWidth();
                    y = parentFrame.getContentPane().getLocationOnScreen().y;
                    break;
            }   
            x += inX;
            y += inY;

            // set the location of this frame
            setLocation(x, y);                     
        }
    }

    /* (non-Javadoc)
     * @see com.mia.sct.view.panel.ICollapsibleFrame#setMask(java.awt.Shape)
     */
    public void setMask(Shape inShape)
    {
        WindowUtils.setWindowMask(this, inShape);
    }

    /* (non-Javadoc)
     * @see com.mia.sct.view.panel.ICollapsibleFrame#setAlpha(float)
     */
    public void setAlpha(float inAlpha)
    {
        if (WindowUtils.isWindowAlphaSupported())
        {
            WindowUtils.setWindowAlpha(this, inAlpha);
        }
    }
}

Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:39:23+00:00Added an answer on May 27, 2026 at 1:39 pm

    not good idea hold two JFrames (or its SwingX derivates) in same time, you have to change that for Un-Decorated JDialog or JWindow (its SwingX derivates), that solving three issues and you can correctly to set

    • setParent

    • setModal, ModalityTypes

    • no iconified in WinOS

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a wx.Frame, in which there is a main wx.Panel with several widgets
I have a login frame that i have to wait for from another thread.
Right I have a main layout defined, that has a frame, a table in
I have three JPanels inside a main Frame. Clockwise from the left, in the
I have main table called 'Employee' and another slave table called 'EmployeeTypes' that has
I have a main asp.net app, which is written in asp.net 1.1. Runnning underneath
I have a main window (#1) on my webpage from which I open a
I have a main canvas 'blackboard' in a panel, this canvas has itself several
Example now I have a main frame contains jtable display all the customer information,
Just need some quick guidance - I have a main frame, and I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.