Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JFrame vs JInternalFrame

807599Apr 2 2007 — edited Apr 2 2007
I am trying to play a video in java, and I have used code from some tutorials, and in the sample code it uses a jfilechooser to select a file, and then play it in a jframe, like so...
JFrame mediaTest = new JFrame( "Media Tester" );
            mediaTest.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
            
            MediaPanel mediaPanel = new MediaPanel( mediaURL );
            mediaTest.add( mediaPanel );
            
            mediaTest.setSize( 300, 300 );
            mediaTest.setVisible( true );
what I am trying to do is create a jframe that is tabbed. one of these tabs has a jinternalframe located in it. so i modified the code to play in the jinternalframe. However, i get sound except no video. possibly the jinternalframe doesn't have the same usage as a jframe?
// JFrame mediaTest = new JFrame( "Media Tester" );
              //  mediaTest.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                
                MediaPanel mediaPanel = new MediaPanel( mediaURL );
            
                newUI.frmScreen.add( mediaPanel );
                
                newUI.frmScreen.setSize( 300, 300 );
                newUI.frmScreen.setVisible( true );
any help is appreciated.
thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 30 2007
Added on Apr 2 2007
1 comment
275 views