Package javax.swing

Examples of javax.swing.JFrame.show()


   public static void main(String args[]) {
     if (args.length > 0) {
       JFrame f = new test(args[0]);
       f.setSize(300, 300);
       f.show();
     } else {
       System.err.println(
        "You must specify an image filename to display");
     }
   }
View Full Code Here


            // available in Java 1.2
            f.setDefaultCloseOperation(3);
        }
        f.getContentPane().add(treeView);
        f.pack();
        f.show();

    }

    public static void main(String[] args) {
View Full Code Here

        w.dispose();
        System.exit(0);
      }
    });
    frame.pack();
    frame.show();
  }
}
View Full Code Here

          System.exit(1);
        }
      });

    f.setSize(640, 480);
    f.show();
  }

  /**
   * Ensures this panels DISPLAYED model is in sync with
   * the model initially passed to the constructor.
View Full Code Here

          System.exit(1);
        }
      });

    f.setSize(640, 480);
    f.show();
  }

  /**
   * Ensures this panels DISPLAYED model is in sync with
   * the model initially passed to the constructor.
View Full Code Here

        JFrame frame = new JFrame();
        frame.getContentPane().add(new NoReceiversWarningPanel());
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.pack();
        frame.show();
    }

    /**
     * @return Returns the dontWarnMeAgain.
     */
 
View Full Code Here

        frame.getContentPane().add(treeViewer, BorderLayout.CENTER);

        // show Frame
        frame.setSize(800, 600);
        frame.pack();
        frame.show();
        frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {
            System.exit(0);
          }
        });
View Full Code Here

        frame.setJMenuBar(menuBar);
        menuBar.add(menu);
        final JButton button = new JButton();
        frame.getContentPane().add(button);
        frame.pack();
        frame.show();
        SwingWaitTestCase.requestFocusInWindowForComponent(button);
        manager.setSelectedPath(new MenuElement[] { menuBar });
        menu.setDelay(100);
        setupTimerAntWait(menu, menuUI, listener);
        assertFalse(listener.visible);
View Full Code Here

        JFrame frame = new JFrame();
        JMenuItem item = new JMenuItem();
        item.setUI(menuItemUI);
        frame.getContentPane().add(item);
        frame.pack();
        frame.show();
        menuItemUI.paint(item.getGraphics(), item);
    }

    /*
     * Test method for 'javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(JComponent)'
View Full Code Here

        menuBar.add(menu);
        menuBar.add(menu2);
        menu.add(item);
        frame.getContentPane().add(menuBar);
        frame.pack();
        frame.show();
        assertEquals(0, menuItemUI.getPath().length);
        MenuSelectionManager manager = MenuSelectionManager.defaultManager();
        manager.setSelectedPath(new MenuElement[] { menuBar, menu, menu.getPopupMenu(), item });
        assertEquals(4, menuItemUI.getPath().length);
        assertSame(menuBar, menuItemUI.getPath()[0]);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.