Problem Displaying Video Component...
I am using the following code for displaying the video of a media file.
videoWindow =new JFrame();
JPanel panel=new JPanel();
Component video = player.getVisualComponent();
panel.add(video);
videoWindow.add(panel, BorderLayout.CENTER);
videoWindow.pack();
videoWindow.setLocationRelativeTo(me);
videoWindow.setAlwaysOnTop(true);
videoWindow.setVisible(true);
if(GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().isFullScreenSupported()&&fullScreen)
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(videoWindow);
else
GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().setFullScreenWindow(null);
Now what I want to do is:
When the window is in the normal state it should be a normal window, a JFrame or JDialog anyone of these two will do.
But when I do some desired action such as click on the video screen (i added a mouselistener to it for doing that) then the video should become in the full screen mode.
Now the problem I am facing is, If i use a JFrame then, after doing fullscreen it's still should the border and title bar of the window. But i don't want that.
So i tried to do this:
videoWindow.setUndecorated(false);
just before I make it go full screen...But then it's not allowing me to do it...
How should i acheive this thing? Can anybodu help me a bit on this? There should be a way so that I can make the border go away in the fullscreen mode while it is there when it's in the normal screen mode...

