Popup.hide() doing absolutely nothing
I have a swing Popup. I am creating it like this:
As you can see, it looks good (I am doing this inside a custom dropdown JComponent). Then, I add buttons to it:
(getTexIndex() is for what texture the button should use, doesn't matter here)
The consumer of MouseEvent is run when the button is released. It should hide the popup, but it doesn't. Then, I show the popup after adding the stuff:
I have absolutely no idea why this code isn't working as intended. Also, it isn't just in this area. Calling hide() somewhere else doesn't work. But, calling hide right after showing it works just fine?
43 Replies
⌛
This post has been reserved for your question.
Hey @The Typhothanian! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
Yes, I have tried SwingUtilities.invokeLater, no effect
And I can't use JPopupMenu because of the natural select overlay. It bleeds through my texture and looks like 🤮
ugh
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
It is a custom class I made
here
and UButtonHusk
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
It works just fine yeah
huh it didn't capture everything
nvmd
apparently xbox game bar doesn't capture popups
any ideas?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
k thank you
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
ping me when your back
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
huh
can I see code?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
huh
The issue could be related to the JButton
actually i have absolutely no clue
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I am looking at this and thinking that there is absolutely no reason why it shouldn't work for me
lemme check one thing
nope that wasnt it
minecraft villager hrm sound
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
i do
but its not just the UWT part
its everything I've worked on in the past 6 months
i can separate it if you give me a min
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
im stupid jar files exist
and its a modular project
sorry i was grabbing h2o
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
Whats the cmd prompt command to run a jar with a custom main method path?
java -jar something?
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
yeah did that and got no main manifest
oh wait
sorry
the middle one with abc on it is the dropdown
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
k
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
may not import the best since its a module
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
ok
thank you
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
I feel like when I click it to close the dropdown it just opens it again
Proven because the content of the dropdown reset when doing that
Thinking why
AHA
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
fix
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
I removed the paintMenu from end of paintComponent, then changed the mouseReleased to be that, and works just fine
yeah
Unknown User•11mo ago
Message Not Public
Sign In & Join Server To View
yes
I also need to repaint the other buttons when one is pressed, but it works now
thank you
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@801145088830210129>.