Updating the Jpanel of a class

Posted by ivor on Stack Overflow See other posts from Stack Overflow or by ivor
Published on 2010-03-29T22:00:57Z Indexed on 2010/03/29 22:03 UTC
Read the original article Hit count: 142

Filed under:
|
|

Hi,

After some advice on using jpanel - I'm new to java and playing around with the GUI elements.

Bascially what I'm curious about is if I can set up a Jpanel in one class, then somehow add labels etc to the that container, but from another class.

Is this possible ? or do i have to set the entire GUI up in one class, but then I guess I would have the same issue, if I wanted to update those fields I had set up in the main class from another class?

Apologies I don't really have any code that's usefull to demostrate here - I'm just trying to get the idea going, working out if its possible before I go ahead. And I'm not even sure if this is possible. Any advice would be greatly appreciated.

Thanks

© Stack Overflow or respective owner

Related posts about java

Related posts about oop