0

How to bind or connect JFrame with multiple Java classes for transfer variable value and data between them?

I'm new in GUI Java programming so my problem is I don't understand how to get and send variable values from Java class to JFrame and from frame to Java class.

Can anyone provide me with good links to how to bind or connect frame with Java class?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Fadi
  • 2,320
  • 8
  • 38
  • 77
  • 2
    1) See [The Use of Multiple JFrames, Good/Bad Practice?](http://stackoverflow.com/a/9554657/418556) 2) For better help sooner, post an [SSCCE](http://sscce.org/). 3) BTW - the nature of your question suggests that the code `extends JFrame`. It should not do that, but instead simply create and keep a reference to a frame. – Andrew Thompson Dec 31 '13 at 11:39

1 Answers1

1

One thing to keep In mind is that probably you will need to create your JFrame as the main class of your application and will create your other variables inside that class. If you need to share values you could pass the reference of the frame to the other objects.

prmottajr
  • 1,816
  • 1
  • 13
  • 22