473,327 Members | 1,920 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,327 software developers and data experts.

comboboxs and buttons, please

Expand|Select|Wrap|Line Numbers
  1. public class ButtonListener implements ActionListener
  2.      {
  3.            public void actionPerformed(ActionEvent event)
  4.       {
  5.             JComboBox yearcombo = (JComboBox)event.getSource();
  6.           JComboBox gendercombo = (JComboBox)event.getSource();
  7.  
  8.            JComboBox statecombo = (JComboBox)event.getSource();
How do i give the combo box and j button's the action focus and make combo class fields and give the combo boxes the necessary scope
Oct 8 '07 #1
1 1020
r035198x
13,262 8TB
Expand|Select|Wrap|Line Numbers
  1. public class ButtonListener implements ActionListener
  2.      {
  3.            public void actionPerformed(ActionEvent event)
  4.       {
  5.             JComboBox yearcombo = (JComboBox)event.getSource();
  6.           JComboBox gendercombo = (JComboBox)event.getSource();
  7.  
  8.            JComboBox statecombo = (JComboBox)event.getSource();
How do i give the combo box and j button's the action focus and make combo class fields and give the combo boxes the necessary scope
That's a lot of questions.
Open the API docs page for JComboBox and see the methods available to you.
Also read Sun's tutorial on the JComboBox section.
Oct 8 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Eric | last post by:
I have the following function which creates buttons on Excel commandbar. The problem i can't get the buttons to hook up to events. For example, if i create four buttons only the fourth one fires...
7
by: Trvl Orm | last post by:
I am working with 2 frames, Left and Right and the main code is in the left frame, which has been attached. Can someone please help me with this code. I am new to JavaScript and can't figure it...
1
by: sman | last post by:
Hi, I recently read this article on About.com on how to create required fields for a form: http://javascript.about.com/library/scripts/blformvalidate.htm Everything works great except that there...
1
by: momo | last post by:
Hello all, I need some help with radio buttons. This is what I have. I have 15 groups of radio buttons and each group contains three radio buttons which non of them are selected. I need a way...
3
by: Ken Varn | last post by:
This is probably a simple question, but I am new to this so bear with me. I have a ASP.NET form that has a checkbox and a 2 radio buttons. When the checkbox is checked, the 2 radio buttons are...
4
by: Irfan Akram | last post by:
Hi People, I need to add flash buttons to ASP.NET page. Problem is I have added them, but I am not able to link events with those buttons, as with normal ASP.NET buttons. I am sure there is a...
5
by: Edwinah63 | last post by:
Hi everyone, i was wondering if anyone else had observed this and if there is any workaround or patch. i have some screens (an mdi child forms) with the buttons &Add, &Edit, &Save and E&xit,...
7
by: Milo333 | last post by:
Hi Please help, how do i write an if statement to check through 4 radio buttons, if none of the 4 buttons are selected than a message box must popup saying incomplete form, please complete the...
2
by: remya1000 | last post by:
hai i'm using Vb.net. i'm creating 64 dynamic created buttons of 8 rows and 8 columns. And i have 1 Go button, 1 textbox. those were created dynamically. if i enter one number inside textbox and...
8
by: GaryDean | last post by:
I have a Wizard page and need to affect the next and previous buttons from my code-behind. I've googled around and found two solutions, and neither appear to work. I can access the SideBarList...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.