473,396 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Emulating component operation

Hello.

Excuse my poor English.

I have a stupid program that has a three JRadioButton named R, G, and B.
When it is launched, no button is selected. Window is made of one JPanel.
First time, the JPanel's background color is default.

Next, when R button is selected, the background color of the JPanel turns into
red, when G is selected the color turns into green, and when Y, Yellow.

For such a program, normal requirements are that one JRadioButton is selected
when it is launched and that there is at least one another feedback of button
selection (e.g. background color).

My stupid program does not meet these requirement. But if there is a way to
emulate JRadioButton's clicking from code, I can meet them.

Is there such a way?
Am I thinking in a wrong way?

Thank you in advance.

///Hiroki Horiuchi
Jul 17 '05 #1
1 1421
Kiwi wrote:
Hello.

Excuse my poor English.

I have a stupid program that has a three JRadioButton named R, G, and B.
When it is launched, no button is selected. Window is made of one JPanel.
First time, the JPanel's background color is default.

Next, when R button is selected, the background color of the JPanel turns into
red, when G is selected the color turns into green, and when Y, Yellow.

For such a program, normal requirements are that one JRadioButton is selected
when it is launched and that there is at least one another feedback of button
selection (e.g. background color).

My stupid program does not meet these requirement. But if there is a way to
emulate JRadioButton's clicking from code, I can meet them.


See AbstractButton.setSelected() or AbstractButton.doClick() in the
javadoc. (Note that JRadioButton extends AbstractButton.)

HTH,
Ray

--
XML is the programmer's duct tape.
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Kamilche | last post by:
""" Emulating Python inheritance manually. By loading it from disk at run time, you can create new custom types without programmer intervention, and reload them on demand, without breaking...
9
by: Ornac | last post by:
I understand that there is much involved in figuring up I/O throughput, but I'm hoping the answer to the following question will be a simple A, B OR C. Given the configuration below, what...
28
by: Anthony Williams | last post by:
Good morning, I'm currently designing a site, using CSS, and wish to create a variable width two-column layout, with header and footer, and one fixed-width column on the left. Previously, I...
2
by: Bart | last post by:
Hi there, Since you've all told me that frames ar evil, I'm planning to disguard frames in favour of CSS "pseudo-frames" for my personal website. While trying to "emulate frames" (that is I...
5
by: Stephan Schaem | last post by:
How does one write an unmanaged function that perform this functionality? In short I want to turn off/on visual style in my app... Thanks, Stephan PS: two people have been looking for...
0
by: test.file | last post by:
We have an application that is running under Citrix. The application files are located on a shared network drive and the app is launched via UNC. The app contains WinForms that are called from...
4
by: Mario Vázquez | last post by:
Hi all, I'm trying to build a component which takes advantage of other components. So, when this new component is draged to the form, I would like to insert other components on the designer and...
0
by: Pieter | last post by:
Hi, When using clickOnce for a VB.NET 2.0 application it installs fine on every computer, except one (a new one...). Every is isstalled, Framework, Mdac, .... The error in the log file is:...
2
by: teo | last post by:
hallo I'd like to implement the Newsgroup functionality on an AspNet 2.0 page. I don't need all the thousands of usenet groups, but only one. This group doesn't currently exist, it will be...
3
by: gsi | last post by:
We have an intermittent problem with a com callable component created with ..net 2.0. This component is called in asp pages written in VB script on a Win2k3 server. About once every 2-4...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.