I am in the final stages of completing my assignment (urlybird) and am having a problem with swing that I can not figure out. I am following the patterns set out in the monkhouse/cam book using the common 'ConfigOptions' panel in both the server window and the client config dialog. My client config dialog works well... my server window works well in that it shows the menu, status bar, buttons, etc but not the 'ConfigOptions' panel which contains my file name and port number fields. I.e. everything renders perfectly but my panel is missing completely.
If I put in a button where the configOptions are supposed to go, the button renders perfectly. I am not new to java but very new to swing and have no idea on how to start debugging problems like this. Any ideas on where to start?
There are only 10 types of people in this world... Those who understand binary and those who don't.
Seems there is something wrong with your ConfigOptions. But what could be wrong is just a bit of guessing with such limited information.
Is ConfigOptions a JPanel?
Are you able to add another panel (which contains other controls like buttons, text fields, ...) instead of just a button ? (because I guess such a panel is more similar to your ConfigOptions panel)
My server window is a JFrame and I created a content pane (of type JPanel), which contains all my GUI controls. And then I use the setContentPane() to change the existing content pane with mine. If you create your own content pane, don't forget to make it opaque (as described in the API)