File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Swing / AWT / SWT
Modify JToolBar buttons and actions
Joined: Mar 01, 2004
Nov 15, 2004 08:52:00
How can I change the Action of JButton if I have JToolBar instance?
Joined: May 18, 2004
Nov 15, 2004 22:59:00
You have a JButton in a JToolBar. Regardless of where the JButton is, you can give it an action listener with myButton.addActionListener and then in the action listener you tell the application what to do when the button is pressed.
Is that what you mean by change the action?
rocket mass heater
subject: Modify JToolBar buttons and actions
Update GUI In Realtime
Separator in JToolBar
JToolBar in applet
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014