Open A form in the middle of the Screen

Tuesday 29 March 2011
Before you start adding components to the JFrame you might want to make the main application window open in the center of the screen and give the application a title in the main window title bar. To center the main application window do the following:

    Right-click the JFrame and choose Properties
    Click on the Code tab (Figure 5)
    For Form Size Policy choose Generate Resize Code
    Be sure Generate Center is checked
    Click the Close button

0 comments:

Post a Comment