how t know which is the current selected Item on screen

F

focode

i have set labels with images in 2,2 gridlayout , in the form, every
thing is working fine except their is no change on screen when focus
is shifting from one label to another i.e the end user is not able to
detect which is the current focusable item. I am able to know which is
the current label the user is focusing as i have set UID for each
component and when their is shift of focus i collect the uid of
present focusable item , i have to contain the label in a square when
the component is focused so that the end user knows it or any kind of
change when the user shifts the focus from one Label to another will
do for me , tell me any method which brings some kind of change on
the present selected component .

kindly help me this is the last task for me to complete my
application .

I am making it with LWUIT (J2ME)
 
R

Roedy Green

i have set labels with images in 2,2 gridlayout , in the form, every
thing is working fine except their is no change on screen when focus
is shifting from one label to another i.e the end user is not able to
detect which is the current focusable item. I am able to know which is
the current label the user is focusing as i have set UID for each
component and when their is shift of focus i collect the uid of
present focusable item , i have to contain the label in a square when
the component is focused so that the end user knows it or any kind of
change when the user shifts the focus from one Label to another will
do for me , tell me any method which brings some kind of change on
the present selected component

labels are just for decoration. If you want something with the notion
of selection use a JButton, JCheckBox, JRadioButton, JToggleButton,
JList, JComboBox, JTree, JTable...

See http://mindprod.com/jgloss/swing.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

"I mean, source code in files; how quaint, how seventies!"
~ Kent Beck (born: 1961 age: 48), evangelist for extreme programming.
 
F

focode

labels are just for decoration. If you want something with the notion
of selection use a JButton,  JCheckBox, JRadioButton, JToggleButton,
JList, JComboBox, JTree, JTable...

Seehttp://mindprod.com/jgloss/swing.html
--
Roedy Green Canadian Mind Productshttp://mindprod.com

"I mean, source code in files; how quaint, how seventies!"
~ Kent Beck (born: 1961 age: 48), evangelist for extreme programming.

dear Mr Roedy Green

i achieved the effect by setBorderPainted(true) in listner fuction
"focusGained(Component com ){} " and again passing "false" argumemt to
the same function in focusLost(Component com){} , i am working on
LWUIT which is said to be inspired by "swing" , any way if you have
any thing more to suggest me , you are welcome

thanks
Arunesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,240
Members
46,828
Latest member
LauraCastr

Latest Threads

Top