• 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

Taskbar Iconless JFrame?

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am writing a simple program that has more than 1 JFrame.
Each JFrame consist of information about a particular person and that list can go on.

But when i run the app in eclipse it opens 8 windows for 8 JFrame.
Is tehre a way to make it only open 1 ?

kind of like winamp:
the playlist is not in the taskbar but it display (if already open) when the user select the winamp icon in teh taskbar

hope i explained it correctly
[ August 22, 2005: Message edited by: hoang vo ]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
> Each JFrame consist of information about a particular person and that list can go on.

change these to JPanels

then your gui will be roughly this

JFrame - contentPane
JPanel - set as a CardLayout - the holding panel for the 8 or so individual panels

then, when you need to show another person's details, you call
cardLayout.next(), or
cardLayout.show()
 
hoang vo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Its a good idea but the CardLayout will only be able to display one panel at a time.

What I am thinking of would be similar to Winamp.

You have your main player which has playlist window, media library window, etc.

but only the player is minimizable while the other can only be close (like a dialog), they do not exist in the taskbar.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know winamp, but from your description JInternalFrame might do the job

http://java.sun.com/docs/books/tutorial/uiswing/components/internalframe.html
 
hoang vo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i've look into JInternalFrame before
it would been good except the window are inside the containing frame. its like an MDI.

Currently i m testing out JDialog and it seem to work good.

I have a JFrame which is the first record loaded.
then every other record loaded will go into JDialog, a non-modal dialog.

The JFrame when minimize will also mininize the JDialog. which is what i want. just the JDialog .. contains nothing hehe.

ps.
winamp is an mp3 player
 
reply
    Bookmark Topic Watch Topic
  • New Topic