Forums Register Login

JScrollPane

+Pie Number of slices to send: Send
I have a function that returns a JPanel, which has JComboBoxes and JLabels on it.
I call this function a number of times to add a number of panels to a JPanel on a JScrollPane. (i.e. one scrollpane that has one panel which in turn has a number of panels on it)
The first panel is drawn correctly, but my problem is that the JComboBoxes on subsequent panels are not drawn properly, even though the JLabels are. It appears that the JComboBoxes of the 2nd, 3rd etc panels are drawn on top of the JComboBoxes of the first panel.
How do I get around this problem?
+Pie Number of slices to send: Send
Are you specifying that the pop-up on the JComboBox is lightweight or heavyweight? Mixing of lightweight and heavyweight objects on the same canvas will cause problems such as what you describe. Make sure that the lightWeightPopupEnabled is set to true.
brevity is the soul of wit - shakepeare. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1071 times.
Similar Threads
JPanel - Zoom out
clear jPanel
Need to dynamically add checkBoxes in a GUI
Problem with Layouts
Fill a GridLayout vertically instead of horizontally
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 00:41:40.