Its working, but the contents of the JComboBox are partially visible, is there any way to display the whole content... I mean JComboBox width is fixed but its content should expand w.r.t contents length
Originally posted by Abhishek Reddy: leave the size..... let me know, whether it is possible to display the entire content or not
I don't think that was really nice on your part. I understand, you might be rushed to get this thing done, or frustrated at not getting it right on your own, inspite of numerous attempts; all of us have been through that phase.
However, you need to remember, statements like these, might make people think twice before helping you out in the future. You need to be careful about such things buddy
your problem is probably GroupLayout (which I don't use, and can't compile your code to confirm)
here's your code, stripped of all unnecessary stuff, leaving the frame as a default Borderlayout.
I've added another combobox (no prototype display), just for comparison, and added a few extra XXX's to make it stand out
compile/run the code, note the differing widths, then comment out the setPrototypeDisplayValue line, recompile/rerun and you'll notice the 'aaaaaa...' item fully displayed, so it does appear GroupLayout is causing all your problems