Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: append to text field declared out of class

  1. #1
    Member
    Join Date
    May 2010
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default append to text field declared out of class

    so in my gui class (the main class) i have a text field, which is sort of the debug window
    but i want to write to it from constructors of other classes
    but those constructors are called from the action listener of the gui class
    so the problem is, i dont have an instance name for the gui class when i try to append to the debug text area in the constructors
    how do i append to a text area in another class when i have no instance name for the class with the text area in it?


  2. #2
    Forum VIP
    Join Date
    Jul 2010
    Posts
    1,676
    Thanks
    25
    Thanked 329 Times in 305 Posts

    Default Re: append to text field declared out of class

    Why can't you send the instance of the class to the debug window, or whatever you need to access where ever you need to access it?
    Althernatively, you might find something useful here: Java Debug Interface
    I'm not too sure where to look for something helpful.
    NOTE TO NEW PEOPLE LOOKING FOR HELP ON FORUM:

    When asking for help, please follow these guidelines to receive better and more prompt help:
    1. Put your code in Java Tags. To do this, put [highlight=java] before your code and [/highlight] after your code.
    2. Give full details of errors and provide us with as much information about the situation as possible.
    3. Give us an example of what the output should look like when done correctly.

    Join the Airline Management Simulation Game to manage your own airline against other users in a virtual recreation of the United States Airline Industry. For more details, visit: http://airlinegame.orgfree.com/

Similar Threads

  1. validating java text field
    By payal in forum AWT / Java Swing
    Replies: 1
    Last Post: July 24th, 2012, 12:41 AM
  2. scope problem: append to text field declared out of class
    By chopficaro in forum Java Theory & Questions
    Replies: 2
    Last Post: July 14th, 2012, 03:21 PM
  3. Replies: 3
    Last Post: June 17th, 2012, 06:22 PM
  4. Parsing from a GUI text field
    By jdubicki in forum AWT / Java Swing
    Replies: 6
    Last Post: May 17th, 2012, 03:46 PM
  5. How can I append text in JTextArea from another class
    By chikaman in forum AWT / Java Swing
    Replies: 2
    Last Post: December 10th, 2009, 10:26 AM