Package javax.swing

Examples of javax.swing.JFrame


   *
   * @return javax.swing.JFrame
   */
  public JFrame getJFrame() {
    if (jFrame == null) {
      jFrame = new JFrame();
      jFrame.setSize(new java.awt.Dimension(624, 215));
      jFrame.setTitle("ICTCLAS4J��ʾϵͳ");
      jFrame.setContentPane(getJContentPane());
      jFrame.addWindowListener(new java.awt.event.WindowAdapter() {
        public void windowClosing(java.awt.event.WindowEvent e) {
View Full Code Here


   */
  public BrowserSelectorFrame(String pageUrl) {
    mPageUrl = pageUrl;
   
    String msg = mLocalizer.msg("error.title", "Error");
    mFrame = new JFrame(msg);
   
    JPanel main = new JPanel(new BorderLayout());
    mFrame.setContentPane(main);

    msg = mLocalizer.msg("error.message", "No browser found.\n\nDo you want to choose a browser now?");
View Full Code Here

    server.run();
  }

  public static void initFrm() {
    FrmMain frm = FrmMain.getInstance();
    JFrame jf = frm.getJFrame();
    jf.setSize(800, 600);
    jf.setVisible(true);
  }
View Full Code Here

  }

  private void initFrm() {
    FrmMain frm = FrmMain.getInstance();
    JFrame jf = frm.getJFrame();
    jf.setSize(800, 600);
    jf.setVisible(true);
  }
View Full Code Here

  {window.setVisible(true);}

  private void initialize(
    )
  {
    window = new JFrame("PDF Clown Sample Viewer");
    SpringLayout springLayout = new SpringLayout();

    window.getContentPane().setLayout(springLayout);
    window.setName("main");
    window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
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

                Component vc = player.getVisualComponent();
                if ( null != vc )
                {
                    System.out.println("### visual component is " + vc);

                    JFrame aFrame = new JFrame();
                    JPanel aPanel = new JPanel();
                    aPanel.setBounds(0, 0, 176, 144);
                    aPanel.add(vc);
                    aFrame.add(aPanel);
                   
                    aPanel.setBackground(Color.gray);
                   
                    vc.setVisible(true);
                    aPanel.setVisible(true);
                    aFrame.setVisible(true);
                    aFrame.pack();
                }
            }
            catch ( Exception ex )
            {
                ex.printStackTrace();
View Full Code Here

        throws IOException, NoPlayerException
    {
        playerpanel =
            new PlayerPanel(locator);

        frame = new JFrame( locator.toString() );

        //  Allow window to close
        frame.addWindowListener(
            new WindowAdapter() {
                @Override
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 AudioControlListener(playerPanel));
View Full Code Here

  players[master].addControllerListener(new PlayerListener());

        //  Show each Player's Visual Component
        for(int i = 0; i < players.length; i++) {
            JFrame f = new JFrame();
      Container pane = f.getContentPane();

            pane.setLayout( new BorderLayout() );

            Component vis =
                players[i].getVisualComponent();

            if ( vis != null ) {
                pane.add(vis, BorderLayout.CENTER);
            }

            if( i == master ) {
                f.setTitle("Master Player");
    f.addWindowListener(new WindowAdapter() {
        public void windowClosing(WindowEvent e) {
      System.exit(0);
        }
                });

                Component cont =
                    players[i].getControlPanelComponent();

                if( cont != null ) {
                    pane.add(cont, BorderLayout.SOUTH);
                }
            } else {
                f.setTitle("Managed Controller");
            }

            if( f.getComponentCount() != 0 ) {
                f.pack();
                f.setVisible(true);
            }
        }
    }
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.