Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 5 of 5

Thread: The proper SwingGui best fit to display a large information set

  1. #1
    Member
    Join Date
    Jun 2014
    Posts
    77
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default The proper SwingGui best fit to display a large information set

    Hi guys,


    Please,

    I have a simple display method in a java project as given below:

    public void displayInfo() {
    for(Student student : studentdB){
    System.out.println(student.toString() + "\n");

    }

    I would want to use one of Swing components to display the students instead of displaying them on the stdout. Anyone knows how I could go about calling this method in some Swing components that can display all the students in the studentdb?

    Thanks


  2. #2
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: The proper SwingGui best fit to display a large information set

    This is a very vague question. But I guess you could just append the text, that you would print to the console, to a JTextArea or similar component.

  3. #3
    Member
    Join Date
    Jun 2014
    Posts
    77
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default Re: The proper SwingGui best fit to display a large information set

    How about if that text is changing dynamically? Then appending is not possible as I am not sure when the information is updated or not.

  4. #4
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default Re: The proper SwingGui best fit to display a large information set

    You need to define the interface better in order to get a useful answer. There was no mention of dynamically changing data in your first question, just displaying data.

  5. #5
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default Re: The proper SwingGui best fit to display a large information set

    You should perhaps read some tutorials about the observer pattern as that might be helpful to you.

Similar Threads

  1. [SOLVED] problem in crearting a Set object(Set here refers to java.util.Set)
    By arpansen in forum What's Wrong With My Code?
    Replies: 2
    Last Post: July 29th, 2014, 07:18 AM
  2. Replies: 2
    Last Post: July 17th, 2014, 06:20 AM
  3. Replies: 21
    Last Post: May 5th, 2013, 07:04 PM
  4. Dynamic memory partitions? Best fit, worst fit, first fit?
    By EDale in forum Java Theory & Questions
    Replies: 0
    Last Post: April 10th, 2013, 07:55 PM
  5. "java -version" doesn't display proper value.
    By goldest in forum Java Theory & Questions
    Replies: 6
    Last Post: November 1st, 2009, 03:48 PM

Tags for this Thread