Forum Stats

  • 3,827,715 Users
  • 2,260,808 Discussions
  • 7,897,357 Comments

Discussions

Multiple JComboBoxes each with seperate listener

826443
826443 Member Posts: 2
edited Dec 24, 2010 11:55AM in Swing
I am reletively new to Java and I am trying to code an applet with multiple combo boxes, one for day of week, one for month, one for day, and one for year. Each combo box should have a listener and once an "enter" jbutton is pressed The date should show in a string.

i.e.: myDate = new String (""+ dyOfWk+month+day+yr);



I already have all of the combos set up with for loops and they default to today's date.

This is just the start, once I figure out how to get the strings from each box, I would like to add the forementioned string as a new row in a 2d array.

so: newRow[] = {"dyOfWk", "month", "day", "yr"}

If anyone could help with any of these issues it would be greatly appreciated. Thanks.

Answers

  • darrylburke
    darrylburke Member Posts: 18,007
    Moderator action: Moved from Java Programming.
    I am reletively new to Java
    Moderator advice: Please don't post beginner questions in Java Programming. There's a New to Java forum for those.

    db
  • darrylburke
    darrylburke Member Posts: 18,007
    edited Dec 24, 2010 8:37AM
    To get better help sooner, post a [url http://mindprod.com/jgloss/sscce.html]SSCCE (Short, Self Contained, Compilable and Executable) example that demonstrates the problem.

    Don't neglect to read the announcement(s) at the top of the forum topii listing and the forum FAQ linked from every page so that you will know how to format your code correctly.

    db

    edit On second thoughts, don't bother.

    Cross posted
    http://www.dreamincode.net/forums/topic/206821-multiple-jcombobox-help/

    Edited by: Darryl Burke
  • 826443
    826443 Member Posts: 2
    I should clarify then. I am RELETIVELY new, I have completed a class that teaches programming in Java, I have already made many functional applets. The current project is one that is of a higher skill level.
This discussion has been closed.