Results 1 to 2 of 2
  1. #1
    ribbs2521 is offline Member
    Join Date
    Dec 2008
    Posts
    50
    Rep Power
    0

    Default 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.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,315
    Blog Entries
    1
    Rep Power
    26

    Default

    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.

Similar Threads

  1. Layout problem / add components from another class
    By ehochedez in forum AWT / Swing
    Replies: 9
    Last Post: 09-02-2009, 11:42 AM
  2. Manipulating URLs
    By TheFlying_Boy in forum Networking
    Replies: 0
    Last Post: 08-03-2009, 06:01 PM
  3. Manipulating XML
    By JosephMConcepcion in forum XML
    Replies: 2
    Last Post: 04-26-2009, 01:01 AM
  4. Replies: 4
    Last Post: 06-09-2008, 05:44 PM
  5. Loading images in seperate packages?
    By Bibendum in forum New To Java
    Replies: 0
    Last Post: 03-02-2008, 11:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •