RSS Forums RSS
Please support our Java advertiser: Lunarpages Java Web Hosting

First JLIST, used with GUI Inventory

Join Date: Jul 2007
Posts: 186
Reputation: no1zson is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 1
no1zson's Avatar
no1zson no1zson is offline Offline
Junior Poster

Re: First JLIST, used with GUI Inventory

  #10  
Jul 25th, 2007
The only way I know to do that is like this:
	priceField.addActionListener(new ActionListener()
		{
			final void actionPerformed(ActionEvent evt)
			{
			valueField.setValue("$"+new Float(currentCD.getValue()));
			}
		});
I am pretty sure this declares the action event as final, which is not right, but as I know no other way I do it, and then get.


Inventory2.java:187: actionPerformed(java.awt.event.ActionEvent) in  cannot implement actionPerformed(java.awt.event.ActionEvent) in java.awt.event.ActionListener; attempting to assign weaker access privileges; was public
			final void actionPerformed(ActionEvent evt)
			           ^
Inventory2.java:189: local variable currentCD is accessed from within inner class; needs to be declared final
			valueField.setValue("$"+new Float(currentCD.getValue()));
I never drew first, but I drew first blood.
I'm no ones son, unforgiven.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 6:14 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC