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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

JButton Code Help for Beginner

Status
Not open for further replies.

SteverZ

Technical User
Nov 8, 2000
16
0
0
US
* I have an Input Box. We'll say someone types in the number 5.
* I have one Jbutton.
* I have one Text Field for the output.

What would a sample code look like? Behind JButton1 would be a calculation like "5.9 x Input Box value". So, is someone types in the number 5 in the Input Box and presses JButton1, the answer, which would be(in this example) 29.5, would display in the Text Field.

If I can see how it works for one button, I think I can get the others. THANKS
 
Threre are several places on the internet to get examples of code like this. In fact if you go to the API at java.sun.com they provide both tutorials and references for these objects.

-Tarwn --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
This space has nothing in it, it's all ni your imagination
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top