I have added a buttonField into a HorizontalFieldManager in Blackberry app. I added it after adding an EditField. Yet the buttonField doesnt appear. Below is my code
HorizontalFieldManager hfm = new HorizontlFieldManager();
BasicEditField edit = new BasicEditField("Label", "UP");
ButtonField button = new ButtonField("Search");
hfm.add(edit);
hfm.add(button);
add(hfm);
This answer won't solve your problem, but it is important to note that your code is absolutely fine, and there's nothing wrong with it.
HorizontalFieldManager
class is full of bugs introduced in OS 5.0 and as for today (latest version are 7.x) RIM has shown no intention whatsoever of fixing it.
As a sample, here's a bug issue in BB Developer Issue Tracker and still unresolved. I've had to deal with hfm in my latest project and also faced issues I had to workaround by creating my own manager, in a similar way as Shashank's answer shows. You can find more examples on creating a custom manager in SO. Also here are covered the basics.
This is currently the only solution, since RIM is transitioning to BB 10 (C++), and they are dumping the Java API, so don't expect them to fix it anytime soon. Even if they were, it won't be fixed but on the latest OS version, which is useless since BB devices are rarely upgraded.