how to check if JList has been updated?
Hi all, would like to know if there is anyway I could check if JList is being updated so that I can prompt user whether to save the data.
i m new to java and trying to modify some source, not really sure what the following code does, but i assume its to do with checking if text field, radio button, check box are being updated?
...
jTXT_code.getDocument().addDocumentListener(dirty) ;
jRB_dollarOffTotal.addActionListener(dirty);
jCB_showDiscount.addActionListener(dirty);
...
is there some similar ActionListener for JList? so that if items are added or removed from the JList, my program will know to prompt user if they leave the form and did not click on the save button?
Re: how to check if JList has been updated?
Read the API for JList and follow the link to the tutorial on How to Use Lists. There you'll find a link to another tutorial page that tells you how to listen for changes in the list content.
db
Re: how to check if JList has been updated?
Moved from New to Java
db
Re: how to check if JList has been updated?
From a PM: Quote:
Originally Posted by lcchai
Quote:
Originally Posted by
DarrylBurke
Read the API for JList and follow the link to the tutorial on How to Use Lists. There you'll find a link to another tutorial page that tells you how to listen for changes in the list content.
db
sorry, just registered and i have no idea what u r talking abt n where to find it, care to show me the link?
thank u n sorry for botherin u.
Please keep the discussion on the forum. Also, please spell words in full. This is a technical forum, not SMS chat.
Bookmark these:
Java Platform SE 7
Java Platform SE 6
db