Solved

programmatically setting radio-button to selected is not firing the actionPerformed event

Posted on 2004-09-10
6
543 Views
Last Modified: 2008-02-26
hello,

as question title suggests i want to programmatically select a radio-button, but i want it also to fire the radio-buttons actionListener event, how do i do this??
0
Comment
Question by:cathalmchale
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 86

Expert Comment

by:CEHJ
ID: 12028531
You'll have to either call actionPerformed directly or post an event with EventQueue.postEvent(...)
0
 

Author Comment

by:cathalmchale
ID: 12028939
ah ok, no problem that works!!

is there a way of doing this:
the main frame has a tabbed pane - so each tab is a panel.  when a tab is clicked then panelMe becomes visible.
can panelMe listen for an event "when i become visible to the user then do something" ??
0
 
LVL 86

Assisted Solution

by:CEHJ
CEHJ earned 25 total points
ID: 12028988
Add a ChangeListener and then do that something if it's the right panel selected:

http://javaalmanac.com/egs/javax.swing/tabbed_TpEvt.html
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Accepted Solution

by:
objects earned 25 total points
ID: 12031837
button.doClick();
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 12064885
:-)
0
 
LVL 92

Expert Comment

by:objects
ID: 12071463
thanks mate :)
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Configure a Bean in an XML file 4 49
What browser will run Java? 7 128
American Express @Work site and Java 4 68
Find out all repos that a user is most active on Github 1 33
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question