• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

How to set Value from 1 frame to another ?  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having 2 Frame. Frame A and Frame B. Frame A is having a text Field and a button. When i click on the button on the Frame A, how can p*** the value inside the text field of Frame A into a text Field of Frame B which already prepared. Please help !
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need visibility of frame b and the textfield in frame b in frame a. Then just do setText() like normal.
 
tee ming
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Paul,
Thanks for yr reply. But can you show how to make the frame for A visible to Frame B. Maybe you may write some sample code. Thank You !
 
tee ming
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Seems like u r not really undertand my real problem. Below is the details of my probelm.
I have two JFrames in my application . From the first frame when
I click the "Find" Button the second frame is instantiated which
queries for the value to be found . My intention is that when I
click find on the second Frame all other Column values(from the
database) should be dispalyed in the First frame corresponding
to the value I am searching. I am calling the set method in the
first frame from the second frame to dispaly the values in the
first frame. But this is not getting displayed in the first
frame even though i am able to get the result printed in the
console window.
Hope you can be more understand and help me to solve the problem.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!