如何实现控件上显示的托盘?
|
我有这样的屏幕:
+--------+---------------------+
|___A____| |
|________| JComponent I am |
|________| drawing on |
|________| __ __ |
|________| | | |
|________| |
|________| \\__________/ |
|________| |
|________| |
|________| |
+--------+---------------------+
我想这样做,以便当我单击按钮A时,我要绘制的JComponent上方弹出一个托盘?如何最好地实现这一点?通过忽略布局管理器并将其添加到我用作画布或某种分层窗格的JComponent中?
+--------+---------------------+
|___A____|_Tray__| |
|________| JComponent I am |
|________| drawing on |
|________| __ __ |
|________| | | |
|________| |
|________| \\__________/ |
|________| |
|________| |
|________| |
+--------+---------------------+
试图区分JPopupMenu和建议的托盘。
+------+--------------------+
|Button|
+------+
| | <--- JPopupMenu
+------+
+------+--------------------+
|Button|____________| <----- Tray
+------+
没有找到相关结果
已邀请:
0 个回复