1 /*****************************************************************************
2 * JVLCPanel.java: Java Swing JPanel embedding VLC Video Output
3 *****************************************************************************
5 * Copyright (C) 1998-2006 the VideoLAN team
7 * Author: Filippo Carone <filippo@carone.org>
9 * Created on 28-nov-2005
13 * This program is free software; you can redistribute it
14 * and/or modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2 of the
16 * License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful, but
19 * WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
21 * General Public License for more details.
23 * You should have received a copy of the GNU General Public
24 * License along with this program; if not, write to the Free Software
25 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
30 package org.videolan.jvlc;
32 import javax.swing.JPanel;
34 public class JVLCPanel extends JPanel {
36 private final JVLCCanvas jvcc;
39 * Default constructor. The initial size is 200x200
42 jvcc = new JVLCCanvas();
47 * @param args Arguments to initialize JVLC
49 public JVLCPanel(String[] args)
51 jvcc = new JVLCCanvas(args);
56 * @param width The width of the panel
57 * @param height The height of the panel
59 public JVLCPanel(int width, int height) {
60 jvcc = new JVLCCanvas(width, height);
65 public JVLC getJVLCObject() {
66 return jvcc.getJVLC();
69 public void setSize(int width, int height) {
70 super.setSize(width, height);
71 jvcc.setSize(width, height);