How can I make editable combo boxes in AWT?

Sandip Chitale

It is not directly supported by the AWT library. You can use Swing's JComboBox (if you don't have a restriction on using Swing).

In AWT, you can use a combination of a TextField, Button and a List contained in a Window (as the pop down). You may want to model it on Swing's JComboBox.

Or you could develop a control from scratch. Keep in mind that Swing components are simply "drawn" on the screen using AWT graphics commands, so you can really do anything in AWT that you can do in Swing. Of course, the amount of work to reimplement Swing components can be immense...

Some third parties have developed such controls. Search on the web...
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact