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 2 of 2

Thread: JList or Table or maybe something else......

  1. #1
    Junior Member
    Join Date
    Aug 2017
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JList or Table or maybe something else......

    Hello all,

    New here, I do have some programming knowledge however at 50 years I'm sort of out of date and catching up with how things are done now. It like beggining all over again things have changed so much! anyhow I do have a request although its not code related.

    Somewhat new to Java I find a reoccurring issue to be Tables/List and their display. - I know what I want them to do but they never look right or perform correctly and I get the feeling that its the method Im using thats wrong.

    And so I'm here again at the concept stage and I know theres got to be a better way to achieve what I desire so hence this post, I can design

    In an ideal world lets say what I want is a multiple lined depth for each object that I can design to display the state of the object, then hold them in list form, scrollable and selectable, does that make sense,

    So this is what I get,
    not.png

    ..and this would be better
    yes.jpg

    Is there a better way, each line has more depth and a sort of template which displays the format to display the state of each object, and scrolls using the side bars - the column headers I left in for feel really, its the window behaviour I'd like to keep with the design ability for each object represented.

  2. #2
    Member
    Join Date
    Apr 2014
    Posts
    92
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default Re: JList or Table or maybe something else......

    I've done something like this many times. You want each row of the table to be a JPanel which is the parent of that row's components. And the "table" itself should actually be a JPanel, not a JTable, which parents all the rows. Once all that's in place, just use a normal JScrollPane for scrolling behavior.

Similar Threads

  1. Change JTextArea to JList; Display ArrayList in JList
    By AP2000 in forum Collections and Generics
    Replies: 5
    Last Post: June 5th, 2017, 11:37 AM
  2. JList help
    By Masic1990 in forum What's Wrong With My Code?
    Replies: 2
    Last Post: September 6th, 2014, 12:08 AM
  3. adding data in table but the table is in another frame
    By brianskiee in forum What's Wrong With My Code?
    Replies: 3
    Last Post: March 13th, 2014, 03:31 PM
  4. Jlist.
    By lucky123098 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: July 21st, 2013, 06:35 AM
  5. Problem with jList
    By nextdigit in forum AWT / Java Swing
    Replies: 1
    Last Post: April 16th, 2010, 06:19 PM

Tags for this Thread