View Single Post
Old Apr 1st, 2008, 7:12 AM   #2
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 330
Rep Power: 3 kruptof is on a distinguished road
Re: Returning data from a class

Why not just have an attribute and set that to the data returned.And have a getter method for that? Then in your main app you can just assign the texboes Text attribute to this value.

class Sock
{
private String data = "";;

public getData()
{
 return data;
}
...
}

and in your main app do:
Sock s = new Sock();
TextBox.Text = s.getData()
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote