Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 28th, 2003, 02:50 AM
Registered User
 
Join Date: Oct 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default change TextArea in GUI from another class

Hey, I know you can do this I just don't know what to do. First off I have a GUI with a few TextAreas w/ the rows and cols defined... what I wanna do is setText for a specific TextArea, but from antoher class...I was thinking like making a constructor in my GUI like. I have about 10 TextArea's and was thinking of making a method like these for each TextArea...I dont' know if i would put that after i add the components, but i want them to show before you input text....Or would i have to add it again?

-----in my GUI class somewhere..
public void setText(JTextArea message)
{
textArea1.setText(message);
}
-----in my GUI class


-----Another Class

String message = "TextArea1";
GUIclass name = new GUIclass();
name.setText(message);
-----Another Class






Similar Threads
Thread Thread Starter Forum Replies Last Post
change content of textarea from select darkhalf Javascript 1 April 26th, 2007 06:03 AM
Java Gui (Reload Class) Axar Java GUI 0 June 10th, 2006 05:35 PM
XSLT change class attribute by ID? matallen XSLT 8 March 1st, 2006 05:00 PM
change class on browse button! MichaelTJ .NET Web Services 0 November 11th, 2003 11:52 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.