[nbj2ee] First time GUI project help - Actions reaching across classes.

  • From: "Nephelus" < >
  • To:
  • Subject: [nbj2ee] First time GUI project help - Actions reaching across classes.
  • Date: Wed, 21 Nov 2012 17:40:04 -0500

So, essentially I'm working on a project with a GUI and this is the first 
real non-simple GUI I've worked on. I'm really stuck and the more research I 
do, the more confused I get about GUI's.

I've got 2 JPanels (called "Components.java" and "Stats.java"). 
Components.java has many comboBoxes where the user selects items and 
Stats.java displays information about the selected items in many JLabels. 

Where I'm stuck is that the comboBoxes in Components.java can't see the 
JLabels in Stats.java . But, I need the JLabels in Stats to update when 
actions in Components are performed.

I know enough to make ActionListeners on GUI components that run code but 
only when that code is in the same class as the component itself. I have no 
idea how to do this when the change has to take place in a different class.

How do I go about doing this?

I'm also using the NetBeans GUI Builder if that makes any difference.






[nbj2ee] First time GUI project help - Actions reaching across classes.

Nephelus 11/21/2012

[nbj2ee] Re: First time GUI project help - Actions reaching across classes.

John Yeary 11/23/2012

Project Features

About this Project

www was started in November 2009, is owned by jpirek, and has 21 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20131025.e7cbc9d). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close