Hello!
Background information:
I am implementing a visual diagram editor, which consists of
- different complex elements (re-sizable, with title bar, sub-elements) and
- different simple elements (not re-sizable, no title bar, no sub-elements).
All elements are draggable.
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.
I have several problems with this concept:
Case 1 - The container is a JDesktopPane:
- JInternalFrames are always above other elements.
- Clicking other elements don't "deactivate" previously active JInternalFrame
Case 2 - The container is a JLayeredPane:
- After clicking some elements inside a JInternalFrame, it stays "activated" forever.
Case 3 - JInternalFrame used for everything, but without decoration for simple elements:
- My custom border (which is needed when I manually remove JInternalFrame's title bar) is every time replaced by current LAF border, after activating/deactivating the JInternalFrame.
I don't get the whole concepts behind activating JInternalFrames anyway. If I could make a JInternalFrame not activable at all, I could choose Case 2 any would be happy.
Please advice me, what would be an simple and straightforward solution to given problems.
NOTE: Selection of components and activation of JInternalFrame seem to be different things.