Diable JList in JDialog at runtime
I am facing a problem with JDialog. I have a JDialog(Modal) which have some panels and controls like- JList, JTextField, JButton etc.
I have two JList one is LstCategory and second is lstSubcategory. If the user select a category and that is valid, lstSubcategory will fill with some options. But if the category is not valid, lstSubcategory will be disabled.
I have used the methods like:
But no function is working.
What should be done to disable or enable lstSubcategory at run time?