• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Swing App Best Practices Question.

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got a JFrame that contains a JList on the left 1/4th and a JTable on the remaining 3/4ths of the application window (similar to how your browser might be set up). The JTable contains a list of people. When the user double-clicks on one of the rows in the JTable, I want the JTable to disappear and a bio page to appear containing more info about the selected person.
My question is: what's the most efficient thing to do with all the JTable objects (the JTable, the DataModel, the CellRenderer, etc.) while the bio is being displayed? I plan on including a "back" button on the bio page that will re-display the original JTable.
Should I create a new JPanel that includes all the bio info, or should I use the original JTable's content pane?
Thanks in advance for any advice,
Will.
 
Ranch Hand
Posts: 2823
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One possibility is to use CardLayout and just flip between the 2. Another would be a JDialog with the information.
 
reply
    Bookmark Topic Watch Topic
  • New Topic