Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / November 2006

Tip: Looking for answers? Try searching our database.

AWT CHOICE old value ?

Thread view: 
pcouas - 03 Nov 2006 06:47 GMT
Hi,

I need to modify an old applet with an awt.choice, i want get old value
before change it
1 i have implement an PropertyChangeListener
2 add Listener for choice component
3 but i never go to my method

An idea ?

Regards

Philippe

public class TComponentCustomizerm extends Panel implements Customizer,

  ItemListener,          // to handle Choice list events

   ActionListener,

  PropertyChangeListener
{
  protected Choice typeChoice = new Choice();

................

  public TComponentCustomizerm()
  {
   super();
   setLayout(new GridBagLayout());

     typeChoice.addPropertyChangeListener(this);
  }

      public  void  propertyChange(PropertyChangeEvent evt ){
   System.out.println("propertyChange01 ");
       System.out.println("propertyChange02 "+evt.getOldValue());
   System.out.println("propertyChange03 "+evt.getNewValue());

}
hiwa - 03 Nov 2006 07:33 GMT
> Hi,
>
[quoted text clipped - 36 lines]
>
> }
<quote>
Adds a PropertyChangeListener to the listener list for a specific
property. The specified property may be user-defined, or one of the
following:

   * this Component's font ("font")
   * this Component's background color ("background")
   * this Component's foreground color ("foreground")
   * this Component's focusability ("focusable")
   * this Component's focus traversal keys enabled state
("focusTraversalKeysEnabled")
   * this Component's Set of FORWARD_TRAVERSAL_KEYS
("forwardFocusTraversalKeys")
   * this Component's Set of BACKWARD_TRAVERSAL_KEYS
("backwardFocusTraversalKeys")
   * this Component's Set of UP_CYCLE_TRAVERSAL_KEYS
("upCycleFocusTraversalKeys")

Note that if this Component is inheriting a bound property, then no
event will be fired in response to a change in the inherited property.
</quote>
Try call typeChoice.setForeground() from other GUI event handler.
pcouas - 03 Nov 2006 11:35 GMT
hI?

i have herited awt.Choice and implemented an old value in two select
methods before super.select

Thanks
Philippe


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.