• Post Reply Bookmark Topic Watch Topic
  • New Topic

Taskbar Iconless JFrame?

 
hoang vo
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • 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 ]
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!