How to get the dimension of a JPopupMenu?
-
29-10-2019 - |
문제
I have a TrayIcon
with a JPopupMenu
attached to it. When I add a JMenuItem
to the popup menu, I want to know the dimension of this popup menu. But the dimension is not calculated: getBounds()
, getSize()
and getVisibleRect()
all return zero-by-zero dimensions.
As you can see in the image, the popup menu certainly has a dimension.
Now how can I get the dimension of the popup menu?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow