Package javax.swing

Examples of javax.swing.JFrame.pack()


        // Set up the tree, the views, and display it all
        final DomEcho03 echoPanel =
           new DomEcho03();
        frame.getContentPane().add("Center", echoPanel );
        frame.pack();
        Dimension screenSize =
           Toolkit.getDefaultToolkit().getScreenSize();
        int w = windowWidth + 10;
        int h = windowHeight + 10;
        frame.setLocation(screenSize.width/3 - w/2,
View Full Code Here


         homeView, PlanComponent.class);

    // 1. Create a frame that displays a home view
    JFrame frame = new JFrame("Home TransferHandler Test");   
    frame.add(homeView);
    frame.pack();
    // Ensure clipboard is empty
    Toolkit.getDefaultToolkit().getSystemClipboard().setContents(new StringSelection(""), null);

    // Show home plan frame
    showWindow(frame);
View Full Code Here

        new HomeController(home, preferences, viewFactory, contentManager);

    // 1. Create a frame that displays a home view
    JFrame frame = new JFrame("Home Print Test");   
    frame.add((JComponent)controller.getView());
    frame.pack();

    // Show home frame
    showWindow(frame);
    JComponentTester tester = new JComponentTester();
    tester.waitForIdle();
View Full Code Here

      });

    // 1. Create a frame that displays a home view
    JFrame frame = new JFrame("Imported Furniture Wizard Test");   
    frame.add(homeView);
    frame.pack();

    // Show home plan frame
    showWindow(frame);
    JComponentTester tester = new JComponentTester();
    tester.waitForIdle();   
View Full Code Here

          je.close();
        }
      });
    frame.getContentPane().add(je);

    frame.pack();
    frame.setVisible(true);

    views.add(je);
  }
View Full Code Here

                System.exit(0);
            }
        });
        JScrollPane scrollPane = new JScrollPane(tree);
        jf.getContentPane().add(scrollPane);
        jf.pack();
        jf.show();
    }

    static void usage() {
        System.err.println("little toy program to display a compiled template as a tree.");
View Full Code Here

       
        setOpaque( true );
        frame.setContentPane( this );

        //Display the window.
        frame.pack( );
        frame.setVisible( true );
    }

    /**
     * Adds the selected item to the table
View Full Code Here

  private static void startWindow()
  {
    JFrame frame = new JFrame("Hellow World");
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.getContentPane().add(new JLabel("hellow world test"), BorderLayout.CENTER);
    frame.pack();
    frame.setVisible(true);
  }

}
View Full Code Here

   * Shows an Address Selection form for the given AddressEntryTextArea.
   */
  public void showAddressWindow(AddressEntryTextArea aeta) {
    JFrame jf = new JFrame(Pooka.getProperty("AddressBookTable.title", "Choose Address"));
    jf.getContentPane().add(new AddressBookSelectionPanel(aeta, jf));
    jf.pack();
    applyNewWindowLocation(jf);
    jf.setVisible(true);
  }

  /**
 
View Full Code Here

                    JOptionPane.showMessageDialog(frame, excptn.getMessage());
                }
            }
        });

        frame.pack();
        frame.setVisible(true);
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }
}
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.