Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Object property dependent on class fields' value

  Asked By: Carolina    Date: Sep 21    Category: Java    Views: 888
  

I got confused. Let me explain my problem.

I got a Swing app which has a frame that includes a number of fields
of different types, such as boolean, String or int. That frame also
has a number of buttons. Those buttons' visibility property is bound
to the combination of the values of the fields in the frame. Let's
say when the Review field is set to false and the DocStatus field is
set to "Approved", Button3 and Button4 should be visible otherwise
they should be invisible. Button5, however, should be visible when
the DocStatus is set to "Approved". Consequently, their visibility
should change whenever the values of those fields are changed. What's
the most efficient way to manage that?

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Ethan Evans     Answered On: Sep 21

whenever the value changed  call repaint or paint
or update()

 
Didn't find what you were looking for? Find more on Object property dependent on class fields' value Or get search suggestion and latest updates.




Tagged: