JMenuBar causes setExtendedState(Frame.MAXIMIZED_BOTH) to not work?

Hello folks,
I'm trying to teach myself Java Swing and I'm going through the tutorials and trying to create little applications as a learning process.
Originally, my intent for this little dummy application of mine was for it to load up maximized. After some searching, I found that you can use setExtendedState(Frame.MAXIMIZED_BOTH);
This worked great until I wanted to create a menu bar. I added JMenuBar and it seems to nullify what I had done before with the setExtendedState.
The problem seems to be with frame.pack();
If I remove the pack function then the screen starts out maximized with the menu bar. If I add it in, then the screen loads up fitted, and when minimized, the frames seem to have no width/height.
Can someone please give me some advice on how I could load up the screen maximized with the menu bar? And when unmaximized (but not minimized), the screen has a reasonable width/height?
Thanks in advance.

HI ,
Actually i also have the same problem, i am creating a gui with four splits . i want the frame to extend to the maximum position when maximize is clicked.
plz help me out what to use actually to make my screen flexible to minimum nd maximum positions.
thanks
swathi.

Similar Messages

  • Cross-frame scripting is not working in Safari 3.0.4. Minimal example code.

    Hello,
    I've found that cross-frame scripting is not working in Safari 3.0.4, as it worked
    ok on Safari 3.0.1, and in other browsers I tried: Firefox, Mozilla, IE.
    document.domain property is set to "ds2ps.net", correctly to the best of my knowledge
    in the frameset and in both frames. Both frames and frameset are loaded
    from subdomains of the same domain "ds2ps.net"
    Please have a look at this mimimal example:
    http://frameset.ds2ps.net/frames-test/frameset.html
    Press buttons to get alert with value of a variable defined in the frameset
    and in the first frame.
    This gives "undefined" in Safari 3.0.4, and give following message in Safari
    JavaScript console:
    Unsafe JavaScript attempt to access frame with URL http://frameset.ds2ps.net/frames-test/frameset.html from frame with URL http://frame2.ds2ps.net/frames-test/frame2.html. Domains, protocols and ports must match.
    Works ok in all other browsers and in earlier versions of Safari.
    Apperently, I'm doing something incorrectly.
    I would appreciate if Apple Safari developers have a look at this problem and suggest solution.
    My company is developing web application which depends on cross-frame scripting,
    and we would like to continue supporting Safari browser.
    Thank you,
    John

    Thank you, iBod,
    We've submitted this bug at http://bugs.webkit.org
    Bug 16444: Cross-frame scripting not working in Safari 3.0.4 despite proper document.domain set in all frames
    Thank you for your suggestion!

  • Scrollable frames. Buttons not working.

    Hello.
    I have a problem with buttons in the scrollable frames.
    I have a slideshow with a thumb's. Each thumb consist of MSO (non active icon and active icon) and clear frame - button to that MSO and to slide foto. The thumb's grouped and placed into the frame with horizontal scroll overlay effect.
    That frame placed into another frame-pull out tab, which have vertical scroll effect. And when I pressed the button, slide fotos changes correctly, but button MSO not working.
    See files from dropbox --  https://www.dropbox.com/sh/rsbf1jto3a39jug/IVcQxaYJOW
    Sorry for my english. I need help very much.
    Thanks.

    Hi,
    I understand that I can use two 'states'  of the buttons. And I tried it. But. Buttons renditions are raster images. And on the retina display we had bad quality. My target was to create vector buttons. With good quality on both displays.
    Any suggestions?
    04.10.2013, в 12:03, Christophe_Quinzoni <[email protected]> написал(а):
    Re: Scrollable frames. Buttons not working.
    created by Christophe_Quinzoni in Digital Publishing Suite - View the full discussion
    Hi (again),
    It seems that you built your stuff in a very complicated way.
    First, try to make simple!
    You mixed MSO and buttons functions. Useless and unfonctional.
    Yous should use only button panel, with two different 'states' ('Normal' and 'Clic').
    See below (no MSO function used at all for the button):
    http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-5735625-468602/445-605/Button_ 1.jpg http://forums.adobe.com/servlet/JiveServlet/downloadImage/2-5735625-468603/448-605/Button_ 2.jpg
    Use the layer panel to easily select the objects you want to modify.
    Please find your file here: https://dl.dropboxusercontent.com/u/46115208/slideshowButton.indd
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at http://forums.adobe.com/message/5735625#5735625
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/5735625#5735625
    To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/5735625#5735625. In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in Digital Publishing Suite at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • DVCPRO HD Frame rate converter not working

    Hello all
    I cant seem to get my frame rate converter to work. I shot the footage on my hvx200 at 720p30 and then put it in film mode and changed the frame rate to 60. Then I log and transfered it into FCP and when i go to convert it i keep getting the same message.
    www.okayyellow.com/errormessage.png
    does anyone know why? I have gotten some footage to convert before with no problems.
    Thanks
    Andrew

    Evening Films wrote:
    All worked well last time I did this (late March), but upgraded to Leopard since then and brought all FCStudio apps up to date at the same time.
    Looks like on import (log/transfer in FCP from Firestore) somehow the files are being flagged as having 'temporal compression', which can't be true if they're DVCPRO-HD, can it? Anyway the 'temporal compression' seems to be blocking the conform in CT, as well as the DFCPRO FRC in FCP.
    So I tried importing the files from the Firestore thru an older version of FCP (5.1.4) that I have on my PowerBook (the problems described above are on my Mac Pro). I then copied these files out of the capture folder over to the Mac Pro, and sure enough: no problems with 'temporal compression'. The files were all marked as "maximum quality" and were allowed to be conformed from 60 to 24 in CTools, and have dupl frames removed using the FRC as needed.
    So something appears to be broken with FCP 6.0.3 and how it imported this particular set of files on the Firestore.
    I should note that if I hadn't tried to conform or FRC these files, I might never have noticed that there was a problem - they behaved as normal 720/60 files when just viewing them.

  • FF4.0 causes my Incredimail client to NOT work. How can I fix this? I luv 4.0 but I can only use one or the other. I need to keep the e-mail client operational, so I reverted back to 3.6.15 for now.

    Ok finally I found a place where I can actually submit a bug report and ask for help. Honestly, this web site is the pitz for user friendliness! Firefox 4.0 is causing my Incredimail client program to NOT work. As soon as I degraded back to 3.6.15 then Incredimail worked just fine again, but will not work if I have installed 4.0. That seems to be the only problem I have found.

    I'm relieved to know that I am not the only one who has experienced this problem. But why is Mozilla/Firefox developers or troubleshooters not posting any comments on this like perhaps . . . "We are aware of this problem and are working on a fix."
    I have not received any communication from them on this forum or on twitter or anywhere else. Anyway I really love FF4.0 and really would like to use both programs together, As it is I have had to go back to 3.6.16 in order to use Incredimail. Firefox/Mozilla, please respond in some form to this request.

  • Quicktime causes buffer overrun and does not work

    I just tried to update to Quicktime 7 (7.0.4). It installs fine.
    When I visit the movie trailers page on Apple.com
    I try to play a clip and I get an error message that says buffer overun (trying to play keynote address in wuicktime application)
    or an error message that says plugin performed an illegal operation and then it crashes my firefox browser.
    It seems there are a lot of bugs with quicktime 7, I have tried standalone downloads of 7.0.3 and 7.0.2, they don't work either.
    I have tried installing in safe mode and the installler will not work. what next?
    do I actually have to reinstall windows to get it to work or do i have to go through the hassle of manually attempting to clear all of the clutter off of the hard drive and tinker with registry settings and try again?
    Is there an explanation from APPLE to rectify these problems or will I just have to give up using your product?
    Is there going to be a fix or is apple not supporting quicktime for windows anymore?
    Too bad version 6 was messed with. It worked perfectly.

    I'm having the exact same problem, since the upgrade this week.
    iTunes does an immediate shutdown when it’s clicked. No errors are reported.
    I automatically thought of Quicktime and when I clicked on it, I get a immediate shutdown as-well, but in Quicktime’s case I get an error window that states “Buffer Overflow error”.
    I’ve tried to uninstall Quicktime from the Add/Remove programs in the Control panel. It flashes, does not report any errors and appears to be removing the program (Quicktime). But, when all is finished Quicktime remains in the Add/Remove programs list and it has not been removed.
    Just to see what would happen, I installed Quicktime all by itself, and then tried to removed it VIA Control Panel. Same experiences (Quicktime remains in the Add/Remove programs list and it has not been removed).
    I’ve removed iTunes a couple of times and tried to re-install (using defaults). Same problem exists (i.e. ‘Buffer Overflow error’).
    I reinstall DirectX. Same problem exists (i.e. ‘Buffer Overflow error’).
    Can Quicktime be removed manually? (i.e. delete files\directories, and Registry edits)?
    Or is this just a nightmare to perform?
    Does anyone have any other thoughts I can try?
    AMD 3300+   Windows XP   512mb memory, CD writer, SATA and IDE HD's, On board Mobo video (S3).

  • After updating latest security update for my OSX 10.7.5 one of my usb port is not working now.how do i know what is cause that usb port is not working after security update

    one of usb port in my macbook pro havent work after i ve updated latest security update for osx 10.7.5, how do i know what is cause that usb port is good or bad

    On a Mac running v10.7.2, the only way to reinstall Safari is to reinstall OS X using OS X Recovery.
    Safari 5.1.1 is for Snow Leopard. It will not run on a Mac with v10.7 installed.

  • Cs6 issue with still frame duration setting not working, possibly yosemite problem

    Hi, I moved my project over to my iMac, which I updated to Yosemite awhile back. Suddenly the frame duration for stills setting defaults to 5 even though it is set at 2 for my animation project. What gives?
    I just bought my master collection two years ago and spent a pretty penny. There were updates for the Mavericks update but none for Yosemite? I think there need to be and people spend too much money on these products for the support option to be so skimpy.
    Hopefully someone answers this issue with a solution. Otherwise, I will not speak highly of Adobe.

    As suggested by someone on a different forum, I tried downgrading the firmware to 7.6.1. By doing so, the problems disappeared and WPA2 only mode works correctly. I will file a bug report with Apple.

  • MFC:Frame region is not working in GDI+

    Hi,
    I created a dialog of polygon region, and trying to draw the frame around the dialog. I am able to achieve it using CDC::FrameRgn.
    But if i want to achieve the same using GDI+, i am not able to do it. I used DrawPolygonPath, but i am seeing the border only in left and top of the dialog. I have attached the my code below. Please help me how to frame the dialog using GDI+.
    CPoint vertex[4];
    BOOL CPolygonDlg::OnInitDialog()
    CDialogEx::OnInitDialog();
    ModifyStyle(WS_CAPTION,0);
    ModifyStyle(WS_BORDER,0);
    CRect rect(400,200,900,700);
    CRect wr = rect;
    AdjustWindowRect( wr, 0, FALSE );
    MoveWindow(wr);
    GetClientRect( rect );
    CRect csr = rect;
    ClientToScreen( csr );
    vertex[0] = CPoint(rect.left,rect.top);
    vertex[1] = CPoint(rect.right,rect.top);
    vertex[2] = CPoint(rect.right,rect.bottom);
    vertex[3] = CPoint(rect.left,rect.bottom);
    m_rgnShape.CreatePolygonRgn( vertex, 4, ALTERNATE );
    m_rgnShape.OffsetRgn( CPoint( csr.TopLeft() - wr.TopLeft() ) );
    SetWindowRgn( (HRGN)m_rgnShape.Detach(), TRUE );
    m_rgnShape.CreatePolygonRgn( vertex, 4, ALTERNATE );
    return TRUE; // return TRUE unless you set the focus to a control
    #define USING_CDC
    void CPolygonDlg::OnPaint()
    CPaintDC dc(this);
    #ifdef USING_CDC
    CBrush *pBrush = new CBrush(RGB(255,0,0));
    dc.FrameRgn(&m_rgnShape,pBrush,1,1);
    #else
    Graphics graphics(dc.m_hDC);
    GraphicsPath gp;
    Point point[4];
    point[0] = Point(vertex[0].x,vertex[0].y);
    point[1] = Point(vertex[1].x,vertex[1].y);
    point[2] = Point(vertex[2].x,vertex[2].y);
    point[3] = Point(vertex[3].x,vertex[3].y);
    gp.AddPolygon(point,4);
    Pen pen(Color(255, 255, 0, 0));
    graphics.DrawPath(&pen, &gp);
    #endif
    Thanks
     

    Hi ,
    I think i found the issue.
    I have applied the offset for the region as below and using that region for CDC ::FrameRegion. So its working.
    m_rgnShape.OffsetRgn( CPoint( csr.TopLeft() - wr.TopLeft() ) );
    So now my question is, how to frame using GDI+ by taking the same region. or is there any other way

  • I have an app that is corrupt and causes LTE and 3g to not work

    I have an iPhone 5 that is almost a year old.  In the past 30 - 45 days I have experienced intermittent connectivity issues on both LTE and 3G networks.  Ironically, I have not had any issues with wi-fi.  I have wiped the phone and it has worked perfectly for days.  Does anyone have any ideas if it would be a corrupt app that is causing the issues?  If I restore the problem returns.  Is there an easy way to restore the phone to the old backup without restoring the corrupt file?  How do I figure out the cause? 
    Thanks!

    Something in your backup is obviously corrupt. Whether it's an app or something else is hard to say.
    Set it up as new, re-sync your data, and start re-installing your apps. Restoring from a backup is all or nothing. You can't selectively restore or not restore specific things.

  • Fit Frame to Shortcut not working in Indesign CC

    Have tried deleting my preferences and making sure there were no system keyboard shortcuts that had the same keystrokes. Any other ideas?

    It's working for me in InDesign CC on the same operating system.
    Here's a couple ideas:
    Make sure there's not a Mac OS X system shortcut already set to this shortcut. Go to System Preferences > Keyboard Shortcuts and check all the tabs for existing system shortcuts (I didn't find any but maybe you had set one). InDesign CC now gives preference to the system.
    You could also try restoring your InDesign preferences.

  • HELP ADOBE AS3! Playing frame twice is not working

    okay so I'm almost done with my website, but i got really stuck on the last part.
    i have a main page that works perfectly wen i just open my site, in it are buttons that takes me to three other minor pages, there are buttons in the minor pages that takes you back to the main page. when i click on these buttons and get i succesfully get to the mainpage, the codes don't work anymore and i cant click on the buttons to go to the minor pages :S!!! WHAT IS THE PROBLEM :'(.. it works in the begining and then it does't this doesnt make sense:
    this is the code i use:
    stop();
    buttons.buttonmotion.addEventListener(MouseEvent.CLICK, klk);
    function klk(event:MouseEvent):void {
    gotoAndPlay("motionreal");
    stop();
    buttons.buttonmodeling.addEventListener(MouseEvent.CLICK, hhh);
    function hhh(event:MouseEvent):void {
    gotoAndPlay("modelingreal");
    stop();
    buttons.buttonprint.addEventListener(MouseEvent.CLICK, kjk);
    function kjk(event:MouseEvent):void {
    gotoAndPlay("printreal");
    stop();
    buttons.buttonweb.addEventListener(MouseEvent.CLICK, lkk);
    function lkk(event:MouseEvent):void {
    gotoAndPlay("webreal1");
    stop();
    buttons.buttonaboutme.addEventListener(MouseEvent.CLICK, sos);
    function sos(event:MouseEvent):void {
    gotoAndPlay("aboutmereal");

    i tried making it go back the the mainpage by frame number and by label, and it actually does but the codes don't work anymore, and the codes are on top of that frame number and label name. i have the mainpage and other pages, all inside a movieclip.. called "masterclip" could that be the problem?
    my buttons are inside two movieclips, could that be the problem?
    im desperate for help ive been trying to finish my website for 3 months now, thats crazy!!!
    thanks for the reply , i hope u can solve me problem

  • Update for iTunes 11.0 causes Bose Portable Sounddock to not work

    This morning my Bose Portable Sounddock stopped playing sound ... although it still charged devices. My iPod Touch runs iOS 4.2.1 (which is as far as it will update), my iPhone 4GS runs on iOS 6.0.1. They have always worked on my Bose Portable Sounddock, which is about 4 or 5 years old. However, after updating my iTunes software on my computer to iTunes 11.0, I connected both of my devices to the computer to add my Christmas Playlist ... Much to my dismay, my devices no longer had any sound when docked to my Bose!!! I tried many things, even going as far as restoring my iPod Touch. I tried turning everything off and then back on ... nothing. After about 2 hours, I finally called Bose ... WOW, were they ever helpful. Nick (how appropriate since Xmas is near) instructed me to reset the Bose Sounddock. With the portable unit, it required unplugging, then removing the battery, waiting 10 seconds, replacing the battery, plugging it back in and trying ... Voila! All is good and the sound is back. Maybe this will help someone having a similar problem. Definitely, it is worth a few minutes to try. Good luck all!

    Did that and there were no errors shown at any point, such as when publishing the .apk file.
    I found a solution. I was under the impression I needed to use touch events for it to work on a tablet, and changing those to normal mouse events solved the problem. Still not sure why it wouldn't work the other way, but for now it works as needed.
    Thanks!

  • NumLock enabled causes Enter, Backspace, etc., to not work on Solaris

    When NumLock is enabled, Swing applications are not seeing key presses of the Enter, Backspace, and other keys. This is running on a Solaris 10 workstation. I've tried fixing this using xrdb settings, but to no avail.
    Is there a way to fix this so that Java apps see key presses to Enter, Backspace, etc., whether or not NumLock is enabled?
    Thanks,
    Chris

    Hi,
    I am sorry; I mistyped....
    I already configured default-web-site.xml with the above values.
    The war file will run on the solaris oc4j instance, but it just
    runs the wrong initial html. I need a login to be the target
    page, but I don't know how to specify that for my particular
    situation.
    If I run the application within JDeveloper on Windows
    without a war file, it works. I run like this...
    Right click on the (.jpr) project file and run...it will go to the
    correct run target bc I have specified within the project
    settings, the default run target, but when i try to run as a war,
    it does not go to the correct run target so I need to know how to
    specify a default run target for a war file. I did create the
    war after I specified the default run target.
    Thank you!

  • Anchored Frame BorderWidth change - not working

    Hello,
    I have wrote a script to change the BorderWidth of the Anchored Frame to 0.3pt. However, It does not modify BorderWidth as expected. Could you please guide me what am I doing wrong?
    var flow = doc.MainFlowInDoc;    
    var frame = 0;    
    var elementContainer = 0;
    var parentElementContainer = 0;
    var anchoredFrames = flow.GetText(Constants.FTI_FrameAnchor);     
    for (var i = 0; i < anchoredFrames.len; i += 1)    
         frame = anchoredFrames[i].obj;        
         elementContainer = frame.Element.ElementDef.Name;       
          parentElementContainer = frame.Element.ParentElement.ElementDef.Name;               
          if (parentElementContainer == "Figure")           
               frame.BorderWidth = "557314";      // Frame Border Width = 0.3pt, for all kind of parent elements   
    Regards,
    Ankit Shah

    Hi Kirk,
    Ultimately I am trying to conform to PAL. My project was shot on a Canon 5D MK2 at 30 fps. I'm currently using Sony Vegas to do my edit which has been completed.
    I dont really like the look of how vegas drops frames when I set it to 25 fps so I wanted to see how quicktime treated the frame rate conversion but when I change the setting it seems to have no effect.

Maybe you are looking for

  • How to create a top include for module pool program

    hi all..   I want to add my global declarations in one top inlcude.. There are so many other includes in my pgm. But how can i create top include explicitly. Also I have one normal report pgm attached with this module pool.

  • DATETIME in Access

    I have the following code which helps me to add element to the table after retriving result set from Access. I don't know how to set the types for DATETIME. Should i use Timestamp or what? I don't have any idea to write the code. Could any help? priv

  • PC & PlayBook connection problems

    Upon opening the DeskTop software program it disconnects from my PlayBook, can't sync or transfer anything?

  • /etc/hosts

    I guess this belongs here, if not, mods, I apologize :) I set up a Centos server and was browsing logfiles and noticed that instead of the usual 'localhost' string that I see in my Arch logs it had my hostname in all of the log files. After a little

  • Help!, Ipad mini wont turn on even pressing both the home+power button

    iPad wont turn on anymore even i press the home + power button (sleep/wake), nor even if i plug it with the orig. usb to the pc and to the charger! It doesnt respond to anything!. To simplify my problem,  heres what i have done: * I let it plug into