So I have a class called CalendarPanel
that extends JPanel
. It uses a null layout. How would I use CalendarPanel
as a regular component? When I put it in another JPanel
and then add it to a window, it disappears. It is only visible when I add it directly to a window.
EDIT:
And yes, I realize using a JPanel
with a null layout is bad practice. CalendarPanel
is actually someone else's code, and I'm trying to use it for my purposes without having to refactor it.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…