#JPanel add method not accepting components

1 messages · Page 1 of 1 (latest)

austere umbra
#

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?

dapper totemBOT
#

This post has been reserved for your question.

Hey @austere umbra! 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.

azure storm
#

what does your createSingleFrame return?

austere umbra
#

JPanel

azure storm
#

type mismatch?

#

javadoc suggests PopupMenu object is required

austere umbra
#

Why when I added a JPanel object?

azure storm
#

yep

austere umbra
#

Does it change the type of the object?

azure storm
#

no, add method only accepts PopupMenu

#

can you hover over red squigly line?

#

what does the error say?

austere umbra
azure storm
#

yep type mismatch

austere umbra
#

What is a PopupMenu anyway

azure storm
#

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?

austere umbra
#

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

austere umbra