Results 1 to 3 of 3
- 07-20-2007, 09:14 PM #1
Member
- Join Date
- Jul 2007
- Posts
- 2
- Rep Power
- 0
Sharing variables between 2 custom components. Please help.
Hi,
I'm a beginner in java and I have a problem.
I need to use 2 classes, defined in 2 separate files, in a thisrd, main class.
Actually I copy/paste the 2 classes (are made as swing jpanels with controls, textboxes, combos, etc) in the main class, so in the main class they appear as components.
I need to read a value from one ( a combobox selected item), and use it in the second one.
how could this be done ?
- 07-20-2007, 09:40 PM #2
Normally this is done by creating a custom constructor for the components. Send the reference of the objects of the other component to these components with their constructor.
- 07-22-2007, 12:01 PM #3
Member
- Join Date
- Jul 2007
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
GUI components not display
By Eranga in forum AWT / SwingReplies: 2Last Post: 03-12-2008, 02:16 AM -
what is the best ADT to use in p2p sharing
By a_maged in forum NetworkingReplies: 0Last Post: 12-02-2007, 08:15 PM -
sharing of data between sites
By jyovasinedu in forum Advanced JavaReplies: 1Last Post: 11-02-2007, 08:56 AM -
2 threads sharing a data base connection
By Ed in forum Advanced JavaReplies: 2Last Post: 07-04-2007, 04:41 AM -
Gui Components
By Marty in forum New To JavaReplies: 1Last Post: 05-28-2007, 04:04 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks