Skip to content
Advertisement

Tag: jcombobox

checkbox appears when button pressed, java

My code displays a texture where you can type something in and than it should appear under the label with a checkbox. What I want is that the checkbox is only there if the title is set through the textfield. I couldn’t find anything on this topic just cb.validate(); but that didn’t really help me. I also tried doing this.add(cb);

How to change height of a jpopupmenu in a jcombobox?

I am working on an application in which I am handling key release event over a editable ‘JComboBox’, where on every key release a ‘JPopupMenu’ of the ‘JComboBox’ appears. I want to increase the height so that user will be able to see more items at a glance without scrolling. Can anyone please demonstrate how to set the height of

Delete highlighting in JComboBox

When a JComboBox is just made and added and all the background of the selected item is just normal and white: (ignore the enormous spacing after the text) When I then open the list and hover my cursor over an item, that item get’s highlighted, all normal, nothing wrong with it. But the problem now is that the highlighting stays

Dynamically change JComboBox

I am fetching the data values from the database successfully. I have also stored them into a String[] array. I need to load the String array as the items of the JComboBox in response to key actionperformed. How can I reload the items of the JComboBox whenever a key is pressed as the fetched values depend on the key pressed.

Advertisement