I\'m creating an application using the NetBeans GUI Editor, in which I want to have a JSplitPane
, the top component of which will be a Canvas
withi
After reading the comment by davidbuzatto I googled about mixing AWT and Swing components and I was a little surprissed to find out that it is such a bad practice.
I found the most accurate answer to my question here
Heavyweight components have their own Z-ordering. This is the reason why Swing and AWT cannot be combined in a single container. If they are, the AWT components will be drawn on TOP of Swing components.
For example: When AWT components are used with JtabbedPane, they do not disappear when the tabs are switched.
Thanks davidbuzatto for showing me the way :-)