Package javax.swing

Examples of javax.swing.JFrame


    public static void main(String args[]) {
      Player player;

  // This is little trick simply to keep
  // the application running indefinitely.
  JFrame f = new JFrame();

        if( args.length != 1 ) {
            System.err.println("Usage:");
            System.err.println("java ejmf.examples.basics.JMFAudioLoop <Media>");
            return;
View Full Code Here


            return;
        }

        String media = args[0];

  JFrame f = new JFrame(media);

  f.addWindowListener(new WindowAdapter() {
      public void windowClosing(WindowEvent event) {
     System.exit(0);
      }
  });

  playerPanel = new JPanel();
  playerPanel.setLayout(new BorderLayout());
  f.getContentPane().add(playerPanel);
  f.pack();
  f.setVisible(true);

  try {
      URL url = new URL("file:///" new File(media).getCanonicalPath());
      player = Manager.createPlayer(url);
      player.addControllerListener(new VideoTooListener(playerPanel));
View Full Code Here

  }
    }

    public static void main(String [] args) {
  SelectionPanel selPanel;
  JFrame frame = new JFrame("Test SelectionPanel");
  frame.setSize(320, 240);
  frame.getContentPane().setLayout(new FlowLayout());
  frame.getContentPane().add(selPanel = new SelectionPanel(null));
  frame.setVisible(true);
  selPanel.setMinPos(0f);
  selPanel.setMaxPos(0.5f);
 
    }
View Full Code Here

            return;
        }

        String media = args[0];

        JFrame f = new JFrame(media);

        //  Allow window to close
        f.addWindowListener(
            new WindowAdapter() {
                public void windowClosing(WindowEvent e) {
                    System.exit(0);
                }
            }
        );

        JPanel playerpanel = new JPanel();

  try {
      URL url = new URL("file://" new File(media).getCanonicalPath());
      player = Manager.createRealizedPlayer(url);

            f.getContentPane().add(playerpanel);
            f.pack();
            f.setVisible(true);

            player.start();
        }
  catch (MalformedURLException mfe) {
      System.out.println("Bad URL");
View Full Code Here

        if((media = getParameter("MEDIA")) == null) {
            System.err.println("Invalid MEDIA file parameter");
            return;
        }

        JFrame f = new JFrame(media);
        JPanel playerpanel = new JPanel();

  try {
      URL url = new URL("file:///" + new File(media).getCanonicalPath());
      player = Manager.createRealizedPlayer(url);
View Full Code Here

            Component c =
                controls[i].getControlComponent();

            if( c != null && ! c.isShowing() ) {

                JFrame frame = new JFrame(
                    controls[i].getClass().getName() );

                frame.getContentPane().add(c);
                frame.pack();
                frame.setVisible(true);
            }
        }
    }
View Full Code Here

    }
   
    try {
      RegistryEditorPanel panel = new RegistryEditorPanel();
     
      JFrame frame = new JFrame("Registry Editor");
      Container contentPane = frame.getContentPane();
      contentPane.setLayout(new BorderLayout());
      contentPane.add(panel, BorderLayout.CENTER);
     
      //frame.setMinimumSize(new Dimension(480, 320));  // doesn't seem to have any effect (at least in linux), and is not 1.4-compatible anyway.
      frame.setSize(640, 480);
      frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
      frame.setVisible(true);
    }
    catch (Exception e) {
      logger.log(Level.WARNING, "" + e, e);
    }
  }
View Full Code Here

  /**
   *
   * @param args
   */
  private void run(String[] args) {
    frame = new JFrame("FMJ Studio");
    frame.setSize(new Dimension(640, 480));
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

   
    Container contentPane = frame.getContentPane();
View Full Code Here

   * Display the registry editor frame
   *
   */
  private void onOpenRegistryEditor() {
    if (registryFrame == null) {
      registryFrame = new JFrame("Registry Editor");
      RegistryEditorPanel panel = new RegistryEditorPanel();

      Container contentPane = registryFrame.getContentPane();
      contentPane.setLayout(new BorderLayout());
      contentPane.add(panel, BorderLayout.CENTER);
View Full Code Here

        if((message = getParameter("MESSAGE")) == null) {
            System.err.println("Invalid MESSAGE parameter");
            return;
        }

        frame = new JFrame("TickerTape");
        tickertape = new TickerTape(message);
        frame.getContentPane().add(tickertape);
        frame.pack();
    }
View Full Code Here

TOP

Related Classes of javax.swing.JFrame

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.