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 3 of 3

Thread: scope problem: 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 scope problem: 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
    can i pass the text field as an arguement to the constructor or something? and set it equal to a property text field? if i write to the property text field will it output to the gui text field?
    i would write some code 4 u but i really dont think that ^ would work anyways
    thanks guys


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,318
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: scope problem: append to text field declared out of class

    can i pass the text field as an arguement to the constructor or something? and set it equal to a property text field? if i write to the property text field will it output to the gui text field?
    i would write some code 4 u but i really dont think that ^ would work anyways
    Did you try it? What happened? And I'll be blunt - for your own good please avoid shorthand like '4 u'. If indicates that you didn't spend much time formulating or researching your question, and yet you are asking unpaid volunteers do spend their time doing so.

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

    Default Re: scope problem: append to text field declared out of class

    thanks 4 the help

Similar Threads

  1. Replies: 3
    Last Post: June 17th, 2012, 06:22 PM
  2. Parsing from a GUI text field
    By jdubicki in forum AWT / Java Swing
    Replies: 6
    Last Post: May 17th, 2012, 03:46 PM
  3. Dynamic Number Of Text Field
    By HamedAli in forum AWT / Java Swing
    Replies: 3
    Last Post: April 18th, 2012, 08:09 AM
  4. Text in field objects go out of bounds..
    By imsuperman05 in forum AWT / Java Swing
    Replies: 2
    Last Post: April 5th, 2012, 06:35 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