• Post Reply Bookmark Topic Watch Topic
  • New Topic

Quick question about creating and instance and passing it to a constuctor in a GUI  RSS feed

 
Jim Stevens
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So I have a question. I need to create and instance of CardManager. Which I do here.

I need to know how to pass the instance to a constructor in my GUI class.



thank you
 
Devaka Cooray
Marshal
Posts: 5652
765
Chrome Eclipse IDE Google App Engine IntelliJ IDE jQuery Postgres Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you mean that you want to pass that 'man' object to GUIpanel2 class?
 
Jim Stevens
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Devaka Cooray wrote:Did you mean that you want to pass that 'man' object to GUIpanel2 class?


yes
 
davidb smith
Greenhorn
Posts: 4
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
 
Jim Stevens
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
davidb smith wrote:


Already tried doesn't seem to work...
 
Campbell Ritchie
Marshal
Posts: 56599
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is just an example. You can't display a Panel unless you have a top-level container to add it to.
 
Jim Stevens
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:That is just an example. You can't display a Panel unless you have a top-level container to add it to.

Im aware my JPanel works fine.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jim Stevens wrote:Already tried doesn't seem to work...

ItDoesntWorkIsUseless
Other than the typo in the spelling of the class name, what Davidb suggested is the correct way to call the method. So without more information, there's not much anyone can do to help you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!