• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing value from one class to another class(which extends JFrame)

 
abracadabration abracadabration
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
While passing a value from a method of class A to a method in class B, I must instantiate class B in A. But when dealing with swing programs, and when I create a reference for class B (which extends JFrame) in A, it again invocates the already invocated JFrame.

How can I solve this problem?

Is there a efficient way to pass value from one class to another class without invocating destine class constructor(apart from declaring the destine method "static")?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You've already been told about the naming policy once; now I have to tell you about it again. You're required to use a first and last name, a real-sounding name, not gibberish. We want to feel like we're interacting with an adult person, not a robot or an eight-year-old. Real names, please. Until then, you'll find most people don't want to help you. Head back here, please, and try again.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!