Note that there are some explanatory texts on larger screens.

plurals
  1. POSwing: How could I get JInternalFrame treated equally to other components inside a container?
    primarykey
    data
    text
    <p><strong>Background information:</strong></p> <p>I am implementing a visual diagram editor, which consists of</p> <ul> <li>different complex elements (re-sizable, with title bar, sub-elements) and</li> <li>different simple elements (not re-sizable, no title bar, no sub-elements).</li> </ul> <p>All elements are draggable.</p> <p>I am using JInternalFrame (for complex elements) along with JPanel (for simple elements) to represent elements of a schematic diagram. There is a container (either a JDesktopPane or a JLayeredPane), which contain all these elements.</p> <p><strong>I have several problems with this concept:</strong></p> <p><strong><em>Case 1</em> - The container is a JDesktopPane:</strong></p> <ul> <li>JInternalFrames are always above other elements.</li> <li>Clicking other elements don't "deactivate" previously active JInternalFrame</li> </ul> <p><strong><em>Case 2</em> - The container is a JLayeredPane:</strong></p> <ul> <li>After clicking some elements inside a JInternalFrame, it stays "activated" forever.</li> </ul> <p><strong><em>Case 3</em> - JInternalFrame used for everything, but without decoration for simple elements:</strong></p> <ul> <li>My custom border <em>(which is needed when I manually remove JInternalFrame's title bar)</em> is every time replaced by current LAF border, after activating/deactivating the JInternalFrame.</li> </ul> <p>I don't get the whole concepts behind activating JInternalFrames anyway. <strong>If I could make a JInternalFrame not activable at all</strong>, I could choose <strong><em>Case 2</em></strong> any would be happy.</p> <p>Please advice me, what would be an simple and straightforward solution to given problems.</p> <p><strong>NOTE: Selection of components and activation of JInternalFrame seem to be different things.</strong></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload