I have a JPanel
that has a JLayeredPane
. The JLayeredPane
has a JPanel
which has a BoxLayout
and holds a JFreeChart
. The JLayeredPane
also has a JComboBox
; see image below.
The Graph
object is added to the chartHolder
at runtime.
When i run the app the comboBox
display correctly. Once the graph
object is added to the chartHolder
the combobox
stops rendering. Only the graph will display.
If I click in the area where the combo box should be, the dropdown and the combobox become visible. If I click the graph
to dismiss the dropdown the combo box disappears again.
chartHolder
--> DEFAULT_LAYER
in the jLayeredPane
comboBox
--> Pallette_Layer
in the jLayeredPane.
Based on the ordering I have provided to the JLayeredPane
, the combo box should always render above the graph.
What is the issue?