This week's book giveaway is in the Java in General forum.
We're giving away four copies of Event Streams in Action and have Alexander Dean & Valentin Crettaz on-line!
See this thread for details.
Win a copy of Event Streams in Action this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Transfering data between two JFrames

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Allright, I have a project going on which require me to move some data between different JFrames (which are also different classes).

What I want to do in particular is take an Object which I've created in one window and move all that information on to the next window. I've asked this question on other boards with no valid answers.

So say you got 2 classes with JFrames and one class describing an object. The object is created in class 1 and when you press "OK" in the frame @ Class 1, the frame of Class 2 opens and you have all the information at your disposal.

Thanks in advance!
 
Bartender
Posts: 1561
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
On quick glance, this sounds less a Swing issue and more an OOP design issue. You have class1 instantiating class2 and want to pass an object from class1 to class2. Couldn't class2 have a field variable of the object to pass and you either pass it via class2's constructor or some setter method? If I'm missing something, then please re-ask your question with more specific info (if possible) and showing some code or pseudo-code that really demonstrates the issue.

Good luck!

Pete
[ March 29, 2007: Message edited by: pete stein ]
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!