• 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

list of JPanels for a download manager

 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a JPanel that monitors and displays the progress of a thread that downloads and then encodes an audio stream. I thought it would be a nice touch if instead of having a bunch of windows popup showing this information, I could just have one frame with all the panels in a list. As more downloads begin, the list would just add another item (panel). It would like much like this (a screenshot of the Mac OS X safari download manager) screenshot, but with more/different information.

You can't simply put a JPanel in a JList (which I tried ), and JSplitPane only supports two panes. I was thinking maybe a JTable or a JScrollPane would work, but I am having some trouble working through how to go about doing something like that. I think I'd have the same problem with the JTable as I did with the JList, and I can't quite figure out how to work with the viewport to do this sort of thing.

Matt
 
Bartender
Posts: 9626
16
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Looking at the screenshot, what you want to do is create a custom cell renderer for a JList. There's an example in the Java Tutorial. Though the example is uses a Combo Box, JList uses the same renderer, so the code is very similar.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic