Reputation: 189
I am trying to build some very basic interactive GUI for a chess-game. The idea is to help players by allowing them to get "help" by allowing them to click on each chess-piece and see suggestions about what moves to make and such. The only requirement I have is that I after a player has clicked (right-clicked with a mouse) on the chess piece, that a popup appears on both sides of the piece. The left piece contains some information about the piece, the right piece what moves to make.
As far as I can work out, in order to do that I must use JPopUpmenu as I can use the show method which accepts x and y coordinates as input. However, I am not able to use two jpopups it seems. Is there a way around this or is there an alternative way to accomplish the same?
Thanks in advance
Upvotes: 0
Views: 128
Reputation: 109815
not possible to show()
more than one JPopup, maybe bug maybe decision
could be possible by using JWindow
, better could be un_decorated JDialog
(modalit
y, setAlwaysOnTop
, toFront
)
Upvotes: 1