#JPanel add method not accepting components
1 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @austere umbra! Please use
/closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
what does your createSingleFrame return?
JPanel
Why when I added a JPanel object?
yep
Does it change the type of the object?
no, add method only accepts PopupMenu
can you hover over red squigly line?
what does the error say?
yep type mismatch
What is a PopupMenu anyway
A class that implements a menu which can be dynamically popped up at a specified position within a component.
popup basically
what are you trying to do?
I'm trying to layout a list of boxes going downward ontop of my JPanel object which sits on the right side of my screen
Wait if add takes a PopupMenu then how am i supposed to add components to my JPanel??