aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Need help connecting jButton to jText using Forte Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Need help connecting jButton to jText using Forte" Watch "Need help connecting jButton to jText using Forte" New topic
Author

Need help connecting jButton to jText using Forte

Daryl Jonescheit
Greenhorn

Joined: Jan 09, 2002
Posts: 4
Ok, here's what I want to happen in my Swing Applet.
I have a jButton called makeConnectionButton.
I have a jText called makeConnectionText.
I have a method in a different class called makeConnection.
When I click the button, I want it to call the method makeConnection and return output to makeConnectionText.
Sounds simple, but for some reason I'm befuddled.
I was able to get my clear button to clear the text from all of the text components by changing the property of text to "". Is this appropriate or should I have used a method to do it.
Any help would be greatly appreciated..
Daryl
[ February 08, 2002: Message edited by: Daryl Jonescheit ]
jason adam
Chicken Farmer ()
Ranch Hand

Joined: May 08, 2001
Posts: 1932
Since this sounds more like a Swing/AWT question and not an IDE issue, I'm moving it to that forum where it will be better addressed.
Personally, that's the way I always get my text fields to clear. Make a method called clearFields() that's called when you press the clear button.
Jason
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

What I would do is return an Object back from your makeConnection() method. For instance, if you just wanted to return a String do this:

Then your makeConnection() method would look something like this.

As far as clearing your textFields, that is the method I always use.
Hope that helps.


GenRocket - Experts at Building Test Data
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help connecting jButton to jText using Forte