[英]RecyclerView: No adapter attached; skipping layout - However Adapter has been set
[英]Is there a way to set an action command for something that a mouse adapter has been added to?
如果我有 5 個具有相同鼠標適配器的 JPanel,並且我想確定單擊了哪個面板,我該怎么做?
MouseEvent
是ComponentEvent
的子類,因此:
http://download.oracle.com/javase/6/docs/api/java/awt/event/ComponentEvent.html#getComponent%28%29
獲取組件
public Component getComponent()
返回事件的發起者。
返回: 發起事件的組件 object,如果 object 不是組件,則返回 null。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.