Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-03-2009, 02:50 PM
Member
 
Join Date: Apr 2009
Posts: 1
Rep Power: 0
Vinaya Lal Shrestha is on a distinguished road
Default Passing SWT object to another class
Hey, I'm a total newbie in SWT area and am stuck in a problem. What I want to do is pass a SWT Group type from one class A to another class B so that I can create an object of type B that is under the ownership of Group in class A.

Here is an example code:
class A{
.........
Group groupA = new Group(shell, ....);
B objB(groupA);
.........
}

class B{
.........
Group superGroup;
Group groupB = new Group(superGroup, ....);
// B Constructor
B(Group rGroup){
superGroup = rGroup;
}
// Now i create my text boxes within the ownership
// of groupB
.........
}

This is all I want to do, but I'm getting compilation error, what wrong have I done. Please provide a solution. Thanks !!!
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
passing object as value for checkbox values?? Pooja Deshpande JavaServer Pages (JSP) and JSTL 0 03-17-2009 12:55 PM
passing text from a class to a gui class rob AWT / Swing 2 02-14-2009 12:04 AM
Passing a Vector object to a function evapisces New To Java 4 09-27-2008 04:18 AM
Problems passing a scan object to a method xkross New To Java 4 04-16-2008 04:56 PM
Passing a new object to a constructor please clarifiy the concept for me please. stefan24 New To Java 2 07-09-2007 06:01 PM


All times are GMT +2. The time now is 01:31 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org