How to move JPopup to Glasspane

I place the combobox component on a glass panel so that users can select from a list of items. When the drop-down list is clicked, although JPopupMenu is hidden behind the other parts of the component on the glass, since the pop-ups are displayed on the LayeredPane.

I would like to learn how to make a pop-up display on glass glass a component. I tried JPopupMenu.setDefaultLightWeightPopupEnabled (false) before the frame was initialized, but the popup seems to not display at all, and I'm not sure why.

Any tips on how to get a popup to display on glass instead of jlayeredpane would be helpful. I searched, but most of the answers seem to be related to pushing events down that are captured on glass glass.

I actually use the JideAutoCompletionComboBox , which extends the JComboBox.

Edit question: I have a system system (my application has many tabbed workspaces). I would not want to use the Modal dialog for this and just use the glass panel. The component is mainly intended for creating a message, but one of the subcomponents is combobox. Effectively, you can think of the whole component as a pop-up, but using a glass pane.

+3
source share
1 answer

I don’t like the small floating windows that users can ruin by clicking.

JDialog dialog = new JDialog(...);
dialog.setUndecorated(true);
+3
source

Source: https://habr.com/ru/post/1788609/


All Articles