I am coding a bookshop in Java and have a problem with when a new book is ordered I want the user to select whether it is a ebook or paper book. If it is an ebook I want another combo box to show on the page with called `cboFormat`. I have some code but it doesn't seem to work. 

This is in the constructor. 

```
if("Ebook".equals(cboBookType.getSelectedItem()))
    {
        cboFormat.enable();
    }
     else 
     {
     cboFormat.disable();
     }

```

Why doesn't this work? I have also previously set the format input to disabled.