JPanel not extending to full size of JFrame

Hello,
I have a JFrame that represents the launch of my application. The frame is sized for a Welcome message and a subsequent login. Once login has occurred, I have resized the JFrame to fit the application. The frame resizes, but the panels within the frame do not change. I am using revalidate() to update the panel, which works fine for the contents, but, again, the size of the panel if the original size of the panel from the previous frame size. I am at a loss at this point as to how I get past this issue.

I don't understand what you mean? Also, when I use pack(), my login button, which should appear as south in pane1, appears next to my label in the west.
Here is some code:
private JFrame frame = new JFrame();
private JPanel panel = new JPanel();
ERPLaunch2()
     // Setup Application Frame
     super("The New Unison ERP System");
     setBounds(280,220,500, 350);
     setDefaultCloseOperation(EXIT_ON_CLOSE);
     // Setup Application Panel
     panel.setLayout(new BorderLayout());
     // Setup Application Pane 1
     pane1.add(cpane1, BorderLayout.CENTER);
     pane1.add(spane1, BorderLayout.SOUTH);
     cpane1.setLayout(new FlowLayout());
     spane1.setLayout(new FlowLayout());
     cpane1.add(welcomelbl);
     spane1.add(loginbtn);
     // Setup Application Pane 2
     pane2.add(cpane2);
     pane2.add(spane2);
     cpane2.setLayout(new BorderLayout());
     cpane2.add(gpane2, BorderLayout.CENTER);
     spane2.setLayout(new BorderLayout());
     spane2.add(fpane2, BorderLayout.SOUTH);
     gpane2.setLayout(new GridLayout(2,2));
     gpane2.add(new JLabel("<html>User Name: <P>"));
     gpane2.add(uname);
     gpane2.add(new JLabel("<html><P>Password: "));
     gpane2.add(upasswd);
     fpane2.add(okbtn);
     fpane2.add(cancelbtn);
     // Setup Application Pane 3
     pane3.setLayout(new BorderLayout());
     pane3.add(tpane3, BorderLayout.NORTH);
     pane3.add(cpane3, BorderLayout.CENTER);
     pane3.add(bpane3, BorderLayout.SOUTH);
     cpane3.add(sppane3);
     sppane3.setLayout(new GridLayout(1,1));
     tpane3.setLayout(new FlowLayout(FlowLayout.RIGHT));
     sppane3.add(rpane3, BorderLayout.CENTER);
     tpane3.add(logoutbtn);
     bpane3.add(label3);
     rpane3.add(tbpane3);
     // Populate tbpane3 in rpane3 of pane 3
     populateTabbedPane();                    
     // Setup Default Panel as Pane 1 and add to Frame
     panel.add(statusBar, BorderLayout.SOUTH);
     panel.add(pane1);
     getContentPane().add(panel);
     loginbtn.addActionListener(new ActionListener()
          public void actionPerformed(ActionEvent e)
          panel.remove(pane1);
          panel.add(pane2);
          panel.revalidate();
     okbtn.addActionListener(new ActionListener()
          public void actionPerformed(ActionEvent e)
          //setBounds(280,220,500, 350);
          setSize(500,350);
          frame.pack();
          frame.show();
          //panel.repaint();
          panel.remove(pane2);
          panel.add(pane3);
          panel.repaint();
          panel.revalidate();
     cancelbtn.addActionListener(new ActionListener()
          public void actionPerformed(ActionEvent e)
          System.exit(0);
     logoutbtn.addActionListener(new ActionListener()
          public void actionPerformed(ActionEvent e)
          System.exit(0);
public static void main(String args[])
     ERPLaunch2 frame = new ERPLaunch2();
     frame.setSize(275,350);
     frame.pack();
     frame.show();
}

Similar Messages

  • Gradient background is not extending the full height of the page

    Hi, I'm an extreme novice with dreamweaver - still figuring it all out. I'm needing to edit a website that was set up by someone else and I can't figure out why the gradient won't extend the full height of the page. It originally was fine but when we added lengthier text this problem popped up. I've fiddled with the css but nothing I'm doing is working - I hope it's something basic as I'd like to get this done asap.
    The H1 titles are also centred in their columns despite the css saying 'left align' so this also confuses me - can we get them to be left aligned?
    The URL is: www.petrohamman.co.za
    Thanks!
    Ash

    Did this other person leave to take up another career, because the set up is shocking?
    Amend your body css to as below:
    body {
    margin:0;  
    padding:0;
    font-family: Helvetica,arial,sans-serif;   
    color:#E6A9CC;
    You don't need height 125% on your #background css selector so either delete it or comment it out using /*   */ as shown below PLUS add overflow: hidden; as also shown below, that will take care of the gradient issue.
    #background
        width:100%;
        /* height:125%;*/
        background: -webkit-linear-gradient(#FFFFFF, #F4DCEB); /* For Safari */
        background: -o-linear-gradient(#FFFFFF, #F4DCEB); /* For Opera 11.1 to 12.0 */
        background: -moz-linear-gradient(#FFFFFF, #F4DCEB); /* For Firefox 3.6 to 15 */
        background: linear-gradient(#FFFFFF, #F4DCEB); /* Standard syntax (must be last) */
        overflow: hidden;
    Amend text-align: center; which is currently declared in the h1 css selector to text-align: left; OR just delete it completely as the default alignment is already set to left.
    h1
        margin:0;
        padding:0;
        color:#E6A9CC;
        text-align: left;
        font-size:30pt;
    Importantly delete height: 500px; from the #content css selector or comment it out as shown below using /*   */. This is important as any information in the 'content' container will not scroll if the height is deeper than 500px, which it will be. The general rule is you should never set heights on any container, only in special circumstances where you know what the height will be or you want to show a restricted area such as a scrolling frame.
    #content
        width:100%;
        /* height:500px; */

  • Photo will not go to full size

    photos will only go full size in edit. wont open with double click either

    are marked with an exclamation and I cannot edit, bring to full size, or upload
    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.
    If neither help, how did you bring them from the old machine to the new one?
    Regards
    TD

  • Is there anything I can do about the photos not enlarging to full size?

    I recovered my iPhoto library from time machine backup. As I changed my HDD. but some image are not comming full size. how I can get the file back???

    How did you "recover" your photos from TM?  Did you use TM to restore the iPhoto library or did you use the finder to copy your iPhoto library over?
    LN

  • Does not print the full size of a pdf

    Hello - printing problems
    This used to work just fine now it does not.
    When i print a pdf document it is 25% of the normal size.
    I do not have this problem with any other type of file.
    Can someone assist/
    Thank you,
    Tom

    I am printing a pdf file. I issue print using the command and p, then select my printer. If I view the Pdf it is still about 25% or save it and the view or print still the same issue.
    Can you assist

  • Embedded swf not displaying in full size

    So i have a swf file. When i open it with any browser or with the standalone flash player it shows up fine. But when i embed it in an HTML file with the following code :-
    <html>
    <head>
    </head>
    <body>
    <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/
    cabs/flash/swflash.cab#version=6,0,40,0"
    width="800" height="600" id="mymoviename">
    <param name="movie" value="Example.swf" />
    <param name="quality" value="high" />
    <param name="bgcolor" value="#ffffff" />
    <embed src="Example.swf" quality="high" bgcolor="#ffffff width="800" height="600" name="mymoviename" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    </body>
    </html>
    and open it in Firefox or Chrome, it all scales down to a very small size like 100x80. This does not happen in IE though and it plays at original size. The stage dimensions in the .fla file are like 550x400. Any help.

    Check out this thread:
    http://discussions.apple.com/click.jspa?searchID=4541194&messageID=5729015

  • Firefox no longer shows on my full screen. When I rollover the icon on the taskbar, it shows the way it is suipposed to be but it does not ever show full size.

    Firefox was working fine yesterday. Now it's not coming up at all on my full screen but when I rollover the icon on the taskbar a mini screen comes up that shows the way it should be but it doesn't come up on the fuill screen. I did a system restore but it didn't help.
    Fr. Martel

    Try:
    *http://kb.mozillazine.org/Corrupt_localstore.rdf

  • Firefox is now not extending to full screen upon start-up

    Firefox used to open msn homepage completely to the edges of our computer screen, excepting browser .. now.. inexplicably, it leaves a border of desktop background showing. We wish it to return to previous format. (?)
    == This happened ==
    Every time Firefox opened
    == Between last night and this morning, while computer OFF.

    Use Restore or Maximize in the right-click context menu of the Taskbar icon to set focus to the Firefox application if you do not see it.<br />
    Open the system menu via Alt+Space and see if you can resize that window.
    If that works then close Firefox (File > Exit/Quit) to save that setting.
    See also:
    * http://kb.mozillazine.org/Resizing_oversize_window
    If the above didn't help then see:
    * http://kb.mozillazine.org/Corrupt_localstore.rdf
    It is possible that there is a problem with the files sessionstore.js and sessionstore.bak in the Firefox Profile Folder.
    Delete the sessionstore.js [2] file and possible sessionstore-##.js [3] files with a number and sessionstore.bak in the Firefox Profile Folder.
    * Help > Troubleshooting Information > Profile Directory: Open Containing Folder
    * http://kb.mozillazine.org/Profile_folder_-_Firefox
    Deleting sessionstore.js will cause App Tabs and Tab Groups and open and closed (undo) tabs to get lost, so you will have to create them again (make a note or bookmark them).
    See also:
    * [1] http://kb.mozillazine.org/Session_Restore
    * [2] http://kb.mozillazine.org/sessionstore.js
    * [3] http://kb.mozillazine.org/Multiple_profile_files_created

  • How can I force firefox to open every new window at full size of the screen ?

    When I firefox, it reloads my opened windows, but not always at full size.
    So I have to resize each window manualy.
    Is it possible to force firefox to open every window at full size of the screen ?
    Or is it possible to Maximize every window already open in one click ? (like the use of CTRL key in Windows)

    Try experimenting with this add-on: https://addons.mozilla.org/en-US/firefox/addon/default-fullzoom-level/
    By the way, if you have McAfee Site Advisor installed, disable it because it interferes with the way Firefox functions.

  • Satellite A300 PSAG0A - Games Will Not Display in Full Screen Size

    I have a large number of games installed on my computer. At least 90% of them will not display in full screen size but display in a small window with a large amount of black screen surrounding the window. I am running Windows Vista Home Premium 32 bit. However, I do not think it has anything to do with Windows as my husband runs the same games on his Toshiba Satellite L300, running exactly the same version of windows, and they all display in full screen size.
    Altering the screen resolution makes no difference. And, of course, I do select the full screen option in the games.
    Also, sometimes when I have been playing a game and then closed it I find that my desktop picture has shrunk to the smaller size - the same size as the window in which the game was displayed when I was playing it.
    The games work fine in every other way, it is only this small screen size which is driving me nuts.
    I hope that someone can help me with this!!

    Yes, as far as I can tell I have the latest driver. But, even this is confusing to me because....
    My graphics media accelerator is Mobile Intel(R) 965 Express Chipset Family. The installed driver version is 7.14.10.1329. The release date for this is 2007-09-13, as far as I can tell from web searches.
    However, on the Toshiba website for driver downloads, the available driver version is 8.2.0.1012 PV. The date is 2006-12-28. I have downloaded this driver and attempted to install it. I get the message that it has been installed but, after rebooting and checking the installed driver version is still 7.14.10.1329.
    Perhaps, the 8.2.0.1012 PV version does not actually install because it is older than the currently installed version. I would have thought that the driver version with the higher number would be the newer one, but perhaps this is not the case as the dates do not seem to support this theory.
    So now I ask myself, firstly, if the driver available for download on the Toshiba website is not the newest one, then why is it there?
    Secondly, if it is the newest one then why will it not install on my computer?

  • Some "events" on "all events" stay black. Photos in them can not be opened in full size, why?

    Some of my "events" on "all events" stay black. When i'am with the cursor over these "events" the pictures in it are shown. Why do these events stay black and why can't i open the pictures in it in full size? When i zoom them up they become a black triangle and the diashow shows only these black triangles.
    Has anyone an idea how I can make those events and the photos in it to be seen and open in full sizes?

    The ! turns up when iPhoto loses the connection between the thumbnail in the iPhoto Window and the file it represents.
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Rebuild iPhoto Library Database from automatic backup.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one. .
    Regards
    TD

  • Link does not open full size

    I clicked on a bookmark and instead of the full screen opening it only opens in a panel on the left about 1/3 full size.

    Bookmarked pages opening in the side bar is generally caused by Bookmarks that are created via clicking on a link or button on a website to create a Bookmark for the page.
    Make sure that "''Load this bookmark in the side bar''" is '''''not''''' selected/checked.
    *Open the Bookmarks Sidebar (Ctrl+B to open or close the Bookmarks Sidebar), right-click the offending Bookmark, choose "Properties", last item at the bottom above "Save/Close" buttons
    *In the Library window (Bookmarks > Show All Bookmarks), click the offending Bookmark, click the "More" button at the bottom of the Details pane (right-hand pane), item is the last item above the word "Less".
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''
    Not related to your question, but...
    You may need to update some plug-ins. Check your plug-ins and update as necessary:
    *Plug-in check --> http://www.mozilla.org/en-US/plugincheck/
    *'''''Adobe Shockwave for Director Netscape plug-in''''': [https://support.mozilla.com/en-US/kb/Using%20the%20Shockwave%20plugin%20with%20Firefox#w_installing-shockwave Installing ('''''or Updating''''') the Shockwave plugin with Firefox]
    *Adobe PDF Plug-In For Firefox and Netscape: [https://support.mozilla.com/en-US/kb/Using%20the%20Adobe%20Reader%20plugin%20with%20Firefox#w_installing-and-updating-adobe-reader Installing/Updating Adobe Reader in Firefox]
    *Shockwave Flash (Adobe Flash or Flash): [https://support.mozilla.com/en-US/kb/Managing%20the%20Flash%20plugin#w_updating-flash Updating Flash in Firefox]
    *Next Generation Java Plug-in for Mozilla browsers: [https://support.mozilla.com/en-US/kb/Using%20the%20Java%20plugin%20with%20Firefox#w_installing-or-updating-java Installing or Updating Java in Firefox]

  • HT2946 Photoshop edits not showing up in Aperture full size image view

    I see that my issue has actually been somewhat addressed in #9 of this article, however no matter how long I wait, the edits I make in PS simply do not show up in Aperture.  The edits are visible in the thumbnail view, but disappear in full size view. The really strange thing is that this is a completely brand new issue. Literally just started about a week ago. So I'm guessing possibly I have inadvertantly changed a setting or something, but for the life of me, I cannot find anywhere to adjust it. Would greatly appreciate any advice! Thanks!!

    Aperture 3.2.3 has a bug at this time.
    If you are running that version of Aperture, you may be experiencing the issue outlined here:
    http://support.apple.com/kb/TS4237
    We are currently waiting for a fix from Apple.

  • In iPhoto, I can see the thumbnails but not the full-size photos

    In iPhoto, I can see the thumbnails along the bottom but I can't see the full-size photos - I just see a black screen. What should I do?

    There are several possible causes for the Black Screen issue
    1. Permissions in the Library: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Include the option to check and repair permissions.
    2. Minor Database corruption: Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild.
    3. A Damaged Photo: Select one of the affected photos in the iPhoto Window and right click on it. From the resulting menu select 'Show File (or 'Show Original File' if that's available). (On iPhoto 11 this option is under the File -> Reveal in Finder.) Will the file open in Preview? If not then the file is damaged. Time to restore from your back up.
    4. A corrupted iPhoto Cache: Trash the com.apple.iPhoto folder from HD/Users/Your Name/Library/ Caches...
    5. A corrupted preference file: Trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder. (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    If none of these help:
    As a Test:
    Hold down the option (or alt) key key and launch iPhoto. From the resulting menu select 'Create Library'
    Import a few pics into this new, blank library. Is the Problem repeated there?

  • Size of imported powerpoint  presentation on screen not full size

    imported power point presentation when seen on presentation modus on screen is not full size of the screen the slides are only on small size

    PPT files always default to 720x540, and while checking that box will do the job, if you want to change the file so it's actually the correct size, you can always do that on the Document inspector (or apply a new theme to the entire file and choose 800x600 or 1024x768 as the size, it'll resize your file for you).

Maybe you are looking for

  • Patch 20133080:R12.PO.D compatible with 12.1.3

    Hi, we are encountering the Bug 20133080, that cancels the PR line if the PO line is cancelled. Our EBS is 12.1.3, but this patch 20133080:R12.PO.D stated that it was for 12.2.3. however upon checking the patch details README File (https://updates.or

  • Change fiscal year to 2006 in Asset Management : error in year-end closing

    SAP version: 4.0B Transaction Codes used: Year-end closing – AJAB, Fiscal year change – AJRW We are trying to change the fiscal year to 2006 in Asset Management. I tried to change the fiscal year to 2006 for the company code 0055 using transaction co

  • Will CC work with Chrome or Android?

    I have a chromebook and want to use it in creative cloud.  Is this possible? I can't find an answer.

  • LOAD_COMMON_PART Error in ME2M, ME2N, Transactions

    Hello, I have created one implicit enhancement in Include FM06LCS4 to add MRP Controller Field on the selection screen of ME2L. But after moving the changes into production, run time error LOAD_COMMON_PART is coming. It is not coming for ME2L but for

  • TS3992 icloud backup issue

    my iphone4s keeps requesting apple id password and says icloud storage details are unavailable and wont let me backup via icloud? when I try to turn icloud backup on it says 'there was a problem enabling Icoud backup.