JPanel add method not accepting components

My JPanel object isn't accepting components for it's add method. I am trying to add other components of type JPanel to this object and am unabke to. Anyone know why?
No description
14 Replies
JavaBot
JavaBot2w ago
This post has been reserved for your question.
Hey @DevLop games! Please use /close or the Close Post button 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.
straightface
straightface2w ago
what does your createSingleFrame return?
DevLop games
DevLop gamesOP2w ago
JPanel
straightface
straightface2w ago
type mismatch? javadoc suggests PopupMenu object is required
DevLop games
DevLop gamesOP2w ago
Why when I added a JPanel object?
straightface
straightface2w ago
yep
DevLop games
DevLop gamesOP2w ago
Does it change the type of the object?
straightface
straightface2w ago
no, add method only accepts PopupMenu can you hover over red squigly line? what does the error say?
DevLop games
DevLop gamesOP2w ago
No description
straightface
straightface2w ago
yep type mismatch
DevLop games
DevLop gamesOP2w ago
What is a PopupMenu anyway
straightface
straightface2w ago
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?
DevLop games
DevLop gamesOP2w ago
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??
JavaBot
JavaBot2w ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.

Did you find this page helpful?