开发者

how to put ad banner in j2me using lwuit?

开发者 https://www.devze.com 2023-03-28 03:52 出处:网络
I want to put a advertisement banner at the bottom of the screen of my j2me application. How can i set a container fixed at a position so even if the page is scrolled that specific container will be s

I want to put a advertisement banner at the bottom of the screen of my j2me application. How can i set a container fixed at a position so even if the page is scrolled that specific container will be still visible? If not some other way to put up a ad banner above or below the comma开发者_开发技巧nd buttons.


Place the add image in a Button, set the layout of the form to BorderLayout and set the form to scrollable false. Place the button in BorderLayout.SOUTH and your content in a Container (that you can set to scrollable Y true) in the center e.g.:

myForm.setScrollable(false);
Button ad = new Button(adAction);
myForm.setLayout(new BorderLayout());
myForm.addComponent(BorderLayout.SOUTH, ad);
Container actualContent = new Container();
myForm.addComponent(BorderLayout.CENTER, actualContent);
actualContent.setScrollableY(true);
0

精彩评论

暂无评论...
验证码 换一张
取 消