Results 1 to 2 of 2
- 10-20-2009, 10:08 PM #1Member
- Join Date
- Dec 2008
- Rep Power
Manipulating components of a seperate GUI Class
It's been a while since I've used Java and I'm getting back into it. I was wondering if someone could explain how I can manipulate components in a window I've used a different class to create.
I created a public class called Dashboard_GUI, I want another class (Dashboard_Main) to instantiate a Dashboard_GUI object and I want the Main class to be able to change the GUI's components and add to it's tables etc. I don't remember the name of the term I need to research whether it's abstract, implements, extends or what. Or maybe it's just a matter of putting the methods to manipulate it in the GUI class and call them. Just want to make sure I'm going to head in the right direction.
I know there are a lot of other things involved, specifically variable declarations and such but rather than getting into all of that I want to research it myself and ask further questions later since I learn better that way.
What you want to do is basically clean OOPs programming techniques. If you want an outside program to change your class's state, give the class a public method to do so. There's no difference here for GUI programming.
- By ehochedez in forum AWT / SwingReplies: 9Last Post: 09-02-2009, 10:42 AM
- By TheFlying_Boy in forum NetworkingReplies: 0Last Post: 08-03-2009, 05:01 PM
- By JosephMConcepcion in forum XMLReplies: 2Last Post: 04-26-2009, 12:01 AM
- By kewlgeye in forum New To JavaReplies: 4Last Post: 06-09-2008, 04:44 PM
- By Bibendum in forum New To JavaReplies: 0Last Post: 03-02-2008, 10:43 PM