Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Jeanne Boyarsky
Ron McLeod
Sheriffs:
Paul Clapham
Liutauras Vilda
Devaka Cooray
Saloon Keepers:
Tim Holloway
Roland Mueller
Bartenders:
Forum:
Swing / AWT / SWT
JButton with data?
ego hu
Ranch Hand
Posts: 53
posted 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
When a button is pressed, I need some information(like an int)
to be transffered into the "actionPerformed" function,
but I don't know how can I bind some client data with the button or with the event.
Who can help me?
Thank you.
Mike Curwen
Ranch Hand
Posts: 3695
I like...
posted 23 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If the int you require is in a JTextField, then you can simply query the text field inside of the actionPerformed event.
If it's in a variable, just use the variable.
Get me the mayor's office! I need to tell her about this tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
how to display waiting/loading messages until data is displayed to the user
How to refresh Data in JTable
Double Click for JList
Qns on double-clicked for JList
ideas to disable button
More...