Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

pass a control?

Status
Not open for further replies.

tebathe3

Programmer
Jan 17, 2004
89
US
I'm new to Java (I know VB.Net) and I'm wondering if Java will accept a swing control as a parameter in a method. I have a method in a separate class that does some calculations and I'd like to pass a textarea control to it in order to populate it. I tried doing the following but it didn't seem to recognize the type:

public int AmortTable(float mortPymt_, JTextArea txtArea)
{
}

is this a valid method?
 
Maybe you need to import javax.swing.TextArea.

What error do you get?

Cheers,
Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top