Skip to main content

LWUIT_20080714

4 replies [Last post]
heziflash
Offline
Joined: 2008-06-03
Points: 0

Hi

I think that b1.setNextFocusRight(b); is not working well in this version.

Thanks,
Hezi

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
heziflash
Offline
Joined: 2008-06-03
Points: 0

Thanks. it works.

heziflash
Offline
Joined: 2008-06-03
Points: 0

Hi Shai
I'm running this code and i get the focus on b1 insted of b.

f = new Form(" ");

f.setLayout(new BorderLayout());
Container c = new Container(new BorderLayout());

b.getStyle().setBgTransparency(120);
b.getStyle().setBgImage(closedImage);

b.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent arg0) {
}
});
f.addComponent(BorderLayout.CENTER, b);

Container cnt1 = new Container(new BoxLayout(BoxLayout.Y_AXIS));
final Button b1 = new Button("Refill ");

b1.getStyle().setBgTransparency(120);

b1.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent evt) {

}
});

b1.setNextFocusRight(b);

cnt1.addComponent(b1);
f.addComponent(BorderLayout.WEST, cnt1);

Thanks,
Hezi

Shai Almog

Hi,
setNextFocusRight no longer effects initial focus. Use requestFocus
instead.

> I'm running this code and i get the focus on b1 insted of b.
> http://forums.java.net/jive/thread.jspa?messageID=289069

Shai Almog
http://lwuit.blogspot.com/

[att1.html]

Shai Almog

> I think that b1.setNextFocusRight(b); is not working well in this
> version.

The behavior of this method changed in the previous drop (June 25th)
you can check out details in the release notes of that version.
This method seems to work fine for me.

Thanks.

Shai Almog
http://lwuit.blogspot.com/

[att1.html]