István Kohn
István Kohn

Reputation: 135

Subframe creating a new task on the taskbar

I am trying to make an MP3 player, something similar to WinAmp. I'm currently having a minor issue with the GUI:

I have a main frame that will have the equalizer/volume/time elapsed etc. on it, and a sub-frame that will be the playlist. The sub-frame is a class that extends JFrame and is a field inside the main frame's class. Currently I have a button on the mainframe that changes the visibility of the sub-frame. My problem is: when the sub-frame appears, it creates a new task on the task-bar (when it's invisible the task disappears as well). I know it's not a major issue, but I find it somewhat annoying. Is there a way around this?

Upvotes: 0

Views: 727

Answers (1)

Harry Joy
Harry Joy

Reputation: 59660

The subframe is a class that extends JFrame

take JDialog instead of JFrame. This will not create a new task item on task bar.

Upvotes: 3

Related Questions