Is it possible to have content refresh in one combo box after selecting an item in the first combo box. The items in the first combo box would be the types and the second combo box would have that items sub types. In addition, this would have to happen on one frame. The data in the combo box would be read from a database. The types would be a column in the database and so would the sub-types. The database i am using is MYSQL.
Any suggestions for quick easy code?
i have a really good image for illustrating this question, but i need more rep to add it.
Thanks
use XxxComboBoxModel for storing Items for JComboBox
all updates to the JComboBox and its XxxComboBoxModel must be done on EDT
invoke
Databaseevent from theRunnable#ThreadorSwingWorker, redirect this (potentionally) hard and long running task to theWorkers Thread, otherwise Swing GUi will be freeze or unresponsive (for mouse and key events) untill JDBC endedSwingWorkers methods publish(), process() and done() quite good quaranteed that all output wil be done on EDTfor example