File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "why does this code doesn Watch "why does this code doesn New topic

why does this code doesn't work

Dominik Pawlocki

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 ).
Make those changes, and you should get the response you are expecting.
I agree. Here's the link:
subject: why does this code doesn't work
It's not a secret anymore!