Questions tagged as 'jcombobox'

1
answer

Execute actions from the selected item in JComboBox

I wanted to assign value to another class, whichever is selected in JComboBox . For example, if the "Active" item in a combo is selected I wanted to assign a value to a string of an external class if the user had put the combo item "Idle"...
asked by 13.03.2016 / 21:29
1
answer

Set selected ComboBox item as clicked on jTable

I'm trying to fill in the fields of a form as the item clicked on jTable. Text fields are filled in normally, but the comboBox remains with the default value selected. //método que preenche a comboBox public void fillCBFornecedor(){ fornCt...
asked by 19.05.2017 / 01:28
1
answer

Popular JComboBox with strings and IDs brought from the database

I need to popular%% with the data brought from a table in my MySQL Database, but I do not know how to leave an item linked to the corresponding ID. Example: ID 1 refers to the ADM profile and ID 2 refers to the Default profile. If the user se...
asked by 11.05.2017 / 23:23
1
answer

Use user-selected content in ComboBox as key (map) in enum class

Beauty, people? I'm having a hard time. That's exactly what the title says. Code containing cbox: JFileChooser fc = new JFileChooser(new File(pastaPadrao)); String[] siglaStrings = { "Selecione", "CIC", "CISEI", "GERMEM" }; public JComboBox...
asked by 25.01.2017 / 20:01
1
answer

How to add to the AbstractTableModel a combobox populated by database information?

I wonder if it is possible to implement a combobox in a AbstractTableModel so that it receives information directly from the database to fill. if possible could someone give me an example? Since I've always used DefaultTable...
asked by 04.01.2018 / 02:01