aspose file tools
The moose likes Swing / AWT / SWT and the fly likes JBUtton errors(Cant resolve symbol) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "JBUtton errors(Cant resolve symbol)" Watch "JBUtton errors(Cant resolve symbol)" New topic
Author

JBUtton errors(Cant resolve symbol)

kimi lynn
Greenhorn

Joined: Jun 02, 2003
Posts: 27
Hello everybody,
I've an interface with couple of buttons which has the functionality to start and stop the matlab engine.The code is working pretty good.So when i press the start,the matlab engine starts and I press stop button to stop the engine.when I press the stop button before pressing the start, I see some errors in my command promtp.I deicided to disable the stop button and declared start and stop button on class level.
Now, I get the errors, cannot resolve symbols at different lines:symbol-variable start and stop.
Could somebody please tell me how can i fix them.
Thanks for your time.

[ October 30, 2003: Message edited by: kimi lynn ]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

"start" and "stop" are local variables declared in the MatlabRC constructor. That means they're not available to any other methods. They need to be member variables -- i.e., declared at the top level of the class.


[Jess in Action][AskingGoodQuestions]
kimi lynn
Greenhorn

Joined: Jun 02, 2003
Posts: 27
Hi there,
Thanks for your response.I corrected them and I dont see any errors now.But unfortunately, I dont see it working how i actually wanted to.
Before, if i press start and then stop it worked and now it does'nt.What exactly, am trying to do is the stop button shld'nt be able to submit by the user with out submitting the start button.
Any ideas??
I edited my code in my previous post.
Thanks for your time.
Jian Zhang
Greenhorn

Joined: Aug 30, 2003
Posts: 20
well, I can't see the point why you have to declare it as the instance variables first and redefine it again in the constructor. start = new JButton("Start") is enough for the instantiation I think. So any change to it will synchronize. :roll:
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JBUtton errors(Cant resolve symbol)
 
Similar Threads
Start Button Freezing
Image instead of a button
Exception with the Piece of Code
How to start Mat-Eng on a remote pc
return a value by firing a JButton event