Array and Text Fields

Posted on 2011-10-05
Last Modified: 2012-05-12
If I am taking in a array

String[] emails = proj.getEmailAddresses();

how can I show the values of the array in my textfield?  Is this possible?

Here is the method I am calling
   //                                                                      //
   //                     updateCurrentEmails()                            //
   //                                                                      //
   private void updateCurrentEmails() {
      if (currentProject != null) {
            curEmails.setText(); <==  value of array here?
      } // end if
      else {
         curEmails.setText("NO EMAILS SELECTED");
   } // end updateCurrentProjectLabel()  
Question by:jkteater
    LVL 86

    Accepted Solution

    The simplest would be

    Open in new window

    LVL 86

    Expert Comment

    Since there are several, it would probably be better to use a JList
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Suggested Solutions

    An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
    This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

    779 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

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now