wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes why does this code doesn't work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why does this code doesn Watch "why does this code doesn New topic
Author

why does this code doesn't work

Dominik Pawlocki
Greenhorn

Joined: Oct 31, 2001
Posts: 6
Why does this code doesn't work??? (it doesn't show wordHello!! in TextArea and it doesn't show wordControl)

[This message has been edited by Cindy Glass (edited December 17, 2001).]
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
You have a few things wrong with your program. First, you call the class Object, but in your main() method you create an object of type Obiekt. I would refrain from calling any class you create Object. Change your class declaration to Obiekt, and make sure you change your public Object() constructor to public Obiekt().
Second, in your Action class, you instantiate a whole new object class. This is not the same object that you create in main and set to show. What you should do is make your Action class an inner class (defined within your Obiekt class), and just call the show() method (you could do either show() or this.show() ).
Make those changes, and you should get the response you are expecting.
Jason
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: why does this code doesn't work
 
Similar Threads
JFrame problem
Find jLabel reference to update (from array of jLabels)
GridBagLayout...!
arrange the spacing between components
having problems getting my Runnable Interface working