Why does content.setLayout()  generate runtime error?

Hi all.
Can some guru please explain to me why this code is generating following runtime error:
java.lang.Error: Do not use SampleView.setLayout() use SampleView.getContentPane().setLayout() instead
     at javax.swing.JApplet.createRootPaneException(Unknown Source)
     at javax.swing.JApplet.setLayout(Unknown Source)
This is the top level TopLevelMenu.java which calls SampleView.java
public void init()
    // java code
    public void actionPerformed(ActionEvent aevt)
        SampleView sampleview = new SampleView();  // <-- OKAY so far
}And here is the snippet for SampleView.java
public class SampleView extends JApplet
    public SampleView()
      Container content = getContentPane();
      content.setLayout(newBorderLayout());  // <-- RUNTIME ERROR HERE
}Instead of just correcting my code, could you please explain to me what is wrong with it?
TIA :-)

Thanks, but that was a typo, I'm still getting this runtime error!
I tried several different ways e.g.
public void init()
    Container content = getContentPane();
    JPanel headerPane = new JPanel(new BorderLayout());
    SampleView sampleview = new SampleView();
    headerPane.add(sampleview, BorderLayout.NORTH);
    content.add(headerPane);
public SampleView()
  // etc
  return;
}throws the same runtime error! Very puzzled!

Similar Messages

  • Why does itunes send me an error message that says to verify my network setting when I try to download updates?

    Why does Itunes send me an error message that says to verify network settings when I try to download updates?

    Disable ALL security software (firewall, antivirus/spyware, etc) when updating.

  • HT4623 Hi why does my itunes always say "error contacting server" when i update my iPhone 5 with the iOs 6.1.3 update

    Hi why does my itunes always say "error contacting server" when i update my iPhone 5 (iOs 6.0.2) with the iOs 6.1.3 update?

    Hey Tigergirl17,
    Thanks for the question. If you haven't already done so, you may want to update iTunes to v11.1 (released on Sept 18th). After updating iTunes, you can then update your iPhone 5 to iOS 7.
    iOS: How to update your iPhone, iPad, or iPod touch
    http://support.apple.com/kb/HT4623
    Thanks,
    Matt M.

  • TS2363 Why do I get a runtime error R6034 message when installing iTunes 11.1.4.62 on my WIn XP (SP3) system?

    iTunes prompted me to download and install the newest version of iTunes (11.1.4.62). I followed all on-screen prompts. iTunes installation gets to the very end, then I get a popup stating that I have a Runtime Error # R6034 "an application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information. Okay, I am doing that. FYI, I am runnning Windows XP (SP3). Oh, and BTW, now iTunes is COMPLELETY unusable, and I cannot synch any of my multiple iOS devices. Help please!

    Go to Control Panel > Add or Remove Programs (Win XP) or Programs and Features (Later)
    Remove all of these items in the following order:
    iTunes
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support
    Reboot, download iTunes, then reinstall, either using an account with administrative rights, or right-clicking the downloaded installer and selecting Run as Administrator.
    See also HT1925: Removing and Reinstalling iTunes for Windows XP or HT1923: Removing and reinstalling iTunes for Windows Vista, Windows 7, or Windows 8
    Should you get the error iTunes.exe - Entry Point Not Found after the above reinstall then copy QTMovieWin.dll from:
    C:\Program Files (x86)\Common Files\Apple\Apple Application Support
    and paste into:
    C:\Program Files (x86)\iTunes
    The above paths would be for a 64-bit machine. Hopefully the same fix with the " (x86)" omitted would work on 32-bit systems with the same error.
    tt2

  • Why does word for mac 2011 error

    When I am using the word for mac that came installed on my Mac Book Pro, it frequently errors and has to close and I loose my work.  Even though I choose the option to send the report and recover my work, i have lost many things.
    Why does this happen?

    Amy wrote:
    When I am using the word for mac that came installed on my Mac Book Pro
    To my knowledge, Apple does not supply MacBook Pros with MS Word installed.
    Pls specify exactly what app and what version you are talking about. If it is really MS Word, then it's possible it wasn't correctly installed. You should re-install MS Office, and then update it, if applicable.

  • SMSY generating runtime error on adding new system

    In our solution manager system, while trying to add a new system details
    via SMSY transaction we are getting the Runtime Errors
    OBJECTS_OBJREF_NOT_ASSIGNED.
    Please find the dump details.
    Runtime Errors         OBJECTS_OBJREF_NOT_ASSIGNED
    Exception              CX_SY_REF_IS_INITIAL
    Date and Time          29.05.2008 10:47:54
    Short text
        Access via 'NULL' object reference not possible.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "SAPLSMSY_ACTUALIZE_DATA" had to be terminated because
         it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_REF_IS_INITIAL', was not
         caught in
        procedure "UPDATE_HOST_LCR" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        You attempted to use a 'NULL' object reference (points to 'nothing')
        access a component (variable: "ACCESSOR").
        An object reference must point to an object (an instance of a class)
        before it can be used to access components.
        Either the reference was never set or it was set to 'NULL' using the
        CLEAR statement.
    Information on where terminated
        Termination occurred in the ABAP program "SAPLSMSY_ACTUALIZE_DATA" - in
         "UPDATE_HOST_LCR".
        The main program was "SAPLSMSY_MAIN ".
        In the source code you have the termination point in line 2013
        of the (Include) program "LSMSY_ACTUALIZE_DATAF01".
        The termination is caused because exception "CX_SY_REF_IS_INITIAL" occurred in
        procedure "UPDATE_HOST_LCR" "(FORM)", but it was neither handled locally nor
         declared
        in the RAISING clause of its signature.
        The procedure is in program "SAPLSMSY_ACTUALIZE_DATA "; its source code begins
         in line
        1983 of the (Include program "LSMSY_ACTUALIZE_DATAF01 ".
    Source Code Extract
    Line  SourceCde
    1983 FORM UPDATE_HOST_LCR  USING    IV_HOST STRUCTURE SMSY_HOST.
    1984
    1985   DATA:
    1986         ACCESSOR        TYPE REF TO CL_SLD_ACCESSOR,
    1987         VALUE           TYPE STRING,
    1988         VALUE1          TYPE STRING,
    1989         EX              TYPE REF TO CX_SLD_API_EXCEPTION,
    1990         T_INAMES        TYPE SLD_T_STRING,
    1991         INSTREF         TYPE REF TO CL_SLD_CIM_INSTANCE,
    1992         SYSTREF         TYPE REF TO CL_SLD_CIM_INSTANCE,
    1993         CLNTREF         TYPE REF TO CL_SLD_CIM_INSTANCE,
    1994         LINKREF         TYPE REF TO CL_SLD_CIM_INSTANCE,
    1995         INSTHANDLE      TYPE STRING,
    1996         SYSTHANDLE      TYPE STRING,
    1997         CLNTHANDLE      TYPE STRING,
    1998         LINKHANDLE      TYPE STRING,
    1999         T_KEYPROP       TYPE SLD_T_VALUELIST,
    2000         I               TYPE I,
    2001         PROPLIST        TYPE SLD_T_VALUELIST,
    2002         PROPERTY        TYPE SLD_S_VALUELIST,
    2003         FILTER          TYPE REF TO CL_SLD_FILTER.
    2004
    2005   DATA STRING          TYPE STRING.
    2006   DATA IV_SYSTEM       TYPE SMSY_SYSTEM_SAP.
    2007
    2008   GET_SLD_TOP_INFO.
    2009
    2010 * Test the connection to the SLD server:
    2011   TRY.
    2012
    >>>>>       ACCESSOR->PING( ).
    2014
    2015     CATCH CX_SLD_API_EXCEPTION INTO EX.
    2016       VALUE = EX->GET_TEXT( ).
    2017       MSGMACRO 'SCDT_LIS_IF' 'E' 11 'LCR_ERROR'.
    2018   ENDTRY.
    2019
    2020
    2021 * Catch all exceptions potentially triggered by the API:
    2022   TRY.
    2023
    2024
    2025 *   Create a new instance representation object for class SAP_BCSystem.
    2026 *   If an accessor object is supplied in the constructor, the object
    2027 *   reference of the representation can be used in other accessor
    2028 *   methods.
    2029       CREATE OBJECT SYSTREF
    2030         EXPORTING
    2031           CLASSNAME      = 'SAP_ComputerSystem'
    2032           ACCESSOR       = ACCESSOR.
    I am already at the latest support package i.e13
    Regards
    Anthony

    Hi Anthony
      Is your problem solved . I M facing the same problem . I found another thread which is suggesting to follow SAP note 1042815. But it seems that we need to change Some standard include to get it fixed .
    Does SAP suggest to change their own program .
    Waiting for your reply .

  • Why does 3Dmark05 give me this error?

    This is a version I got off Limewire and its not full retail. Its only a demo. Got this error:
    IDirect #DDevice9:Present failed:Device lost(D3DERR_Divice Lost)
    I have the latest drivers off the Nvidia website. What gives? Never used 3d05 before, but I was just testing my new ASUS hybrid card with various benchmarks to make sure things seem to be running right. I do get a posted score in 3dmark05, even though it kicks me out and zaps my screen temporarily to 800X600. 3dmark05, after clicking the ok buttun after the error message posts my score 3,106 which seems about right seeing that I have a slower system.
    So far I have only benched this card, havent played any games for more then ten minutes. graphics seem better.Im not seeing the improvements in Far Cry that I though I would get from a 6800GT on full settings. I know this is a DDR128, but I just though things would be a smoother. Clarity is much better then the 9800pro and this card runs suppringly cool that 6600GT I tested was dangerously hot and I didnt want anything that hot in my case.
    I dont think there is anything wrong with the card. I tested a 6600GT the other week and the this 6800GT hybrid did get me from 43K to 46K on Aquamark3. My 9800pro was at 41K with a slight overclock.....maybe I try some Farcrytests to see if that shows anything...
    BTW I just was going to tell you have the latest drivers and was going to post the version, because after I got the card up and running I downloaded the latest from Nvidia.  Why does my Display Adapter when I click on properties say "7/9/2004" version "6.2.1.1"?....Now when I ran the driver update, it said it was updating the drivers and the drivers name they were version 9/13/05?

    Quote
    >It sounds like the version you got may be damaged. I would try getting the download directly from futuremark. The link >to download it is http://www.futuremark.com/download/?3dmark05.shtmlQuote
    I tried it with another version of 3Dmark05 and got the same error. I also noticed it does it during the CPU test where it tries to make the CPU think its a GPU. I found this:
    http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/directx9_c/directx/graphics/programmingguide/gettingstarted/devices/lostdevices.asp
    I also checked around the net. Seems like there are two reasons for this "lost" error. A resident program pissing 3dmark05 or a voltage issue....I havent had any problems with my system and only have then with 3dmark05. This is with a new version of 3dmark05 and newest drivers installed after Driver Cleaner. SO I still dont know whats up....Again it only does it durring the CPU test for 3Dmark05 and in particular always errors out right when the monster is emerging from the water During the zepplin test.
    Quote
    >As far as the jump is scores, that does not seem like enough going from the 9800 to the 6800. I was able to play >FarCry on my machine will ultra settings with my 9800 (but no anti-aliasing or ansiotropic filtering). And only going from >41k to 46k with aquamark also seems low. Did you use a drivercleaner to fully remove your ATI drivers? If not I would >remove both the NVidia drivers and get the cleaner and clean both ATI and NVidia drivers off of the system and >reinstall your NVidia drivers.Quote
    In my previous post I noted that I was only using the ASUS drivers dated 4/05. Well I went back and used Driver Cleaner then tested. The scores were about the same, but gameplay and visuals were much smoother as I would expect from a card like this. I though that was odd given I had  pretty much the same scores(meaning Aquamark stayed the same and 3dmark went up about 300 points). I then went back to Nvidias site and got the newest drivers and they loaded right this time
    Aquamark: increased 1,000 overal to a solid 47,000-47,500  (I was getting 41K with 9800pro,XTbios OC)
    3dmark03: 9608 (from 9137)
    3dmark05: same score no changes (as noted above still errors out at CPU test)
    Thanks for the input I am VERY happy to be running solid 47000-47500 Aquamarks where as before I was runnign 45500-46000 with driver issues. I not as familiar with 3dmark scores and how the differences pan out when playing games. But you mentioned that My scored seemed low. Is this 47,500 more like what you thought? Also remember the card that I have is a 16,6 6800 GT but has 1ddr128. In this review this guy only gets for 3Dmark03 10,290(vs my 9,608) but he has a 64 bit system. In another review using 3Dmark05 the guy gets 3,838 vs my 4,060 Here the card with some scores:
    http://www.digit-life.com/articles2/gffx/nv40-11.html
    http://www.ap0calypse.com/showthread.php?t=1287
    Things of note:
    1.) Graphics seemed less chopy by just using driver cleaner, but scored stayed about the same.
    2.) After gettting the latest drivers too. Aquamark showed a significant change, yet 3d05 stay the same
    3.) Question Driver Cleaner said to "empty the recycle bin" while in safe mode. I couldnt do this. How do I do that?
    4.) All this with the 1.3 Far Cry patch makes the game much nicer. I can do Full Blast settings, but there is some screen rippple every 15 seconds or so. Not to bad, But not flawlwss like a 64 bit system.

  • ABAP Report generating runtime error

    Hi,
    I have written a ABAP Report.
    It is calling a function module.
    But there is runtime error.
    I don't know the ABAP Syntax.
    I need a document telling me how to write Function Module'
    in ABAP.
    *& Report  ZKB_ADD_VALUE1
    REPORT  ZKB_ADD_VALUE1.
    DATA NUM7 TYPE ZADD_VALUES-NUM1.
    DATA NUM8 TYPE ZADD_VALUES-NUM2.
    DATA NUM9 TYPE ZADD_VALUES-NUM1.
    DATA NUM10 TYPE ZADD_VALUES-NUM2.
    NUM7 = 6.
    NUM8 = 9.
    CALL FUNCTION 'ZADD_VALUE'
      EXPORTING
        NUM1          = NUM9
        NUM2          = NUM10
    IMPORTING
       NUM3          = NUM7
       NUM4          = NUM8.
       WRITE: NUM10.
    FUNCTION ZADD_VALUE.
    *"*"Local Interface:
    *"  IMPORTING
    *"     VALUE(NUM1) LIKE  ZADD_VALUES1-NUM1
    *"     VALUE(NUM2) LIKE  ZADD_VALUES1-NUM2
    *"  EXPORTING
    *"     VALUE(NUM3) LIKE  ZADD_VALUES1-NUM1
    *"     VALUE(NUM4) LIKE  ZADD_VALUES1-NUM2
    DATA:
    FS_TABLE TYPE ZADD_VALUES1.
    FS_TABLE-NUM1 = NUM3.
    FS_TABLE-NUM2 = NUM4.
    INSERT ZADD_VALUES1 FROM FS_TABLE.
    ENDFUNCTION.
    Regards
    Kaushik Banerjee

    Hi,
    Hopefully, you are using transaction SE80.  Follow the menu path Program->Check->Extended program Check.  Make sure that "CALL FUNCTION interfaces" is selected - I normally select everything except "character strings" - and execute.  This will give you a list of errors and warnings, including if you are calling your function module correctly.  You can then double-click on the lines in the report and see the error messages.
    If you're unfamilar with writing function modules, please see place the cursor on the "CALL FUNCTION" statement and press F1.  This should bring up the help for that statement.  On my screen, it shows the help for the ABAP language on the left side.  You can then read about function modules.
    Hope this helps,
    Brian Basch

  • HT5473 Why do I keep getting runtime error when downloading java

    Trying to download Java and I keep getting a runtime error.  Have any suggestions
    THank you

    You can't install Java on an iPad, if that's what you're trying to do.

  • HT4993 Why does my iphone say activation error

    Why does my iphone say activation error

    Because you are running an unauthorized version of the beat software for iOS 7. Or you are a legitimate developer and there is an issue with your last update. You will need to go to the developers section to fix it if that is the case.
    If you are not a developer contact the developer who got the beta for you.

  • Why does it say an unkown error accurred (-50)

    why does it say that everytime i try to put music it doesnt let me plzzzzzzzz help

    See this article.
    http://support.apple.com/kb/TA38535?viewlocale=en_US
    About the only suggestion I have though.
    B-rock

  • Why Does My MATLAB Script Return Error 1048?

    I am running Matlab 6.5, and the matlab scrip is
    M_thred2=M > Thred;
    M is 2 dimensional array and Thred is a constant, so M_thred2 will have thresholded array from M.
    If I make M as output, it works fine, but M_thred2 doesn't.

    Hi,
    This error can occur if your variable name is the same as a function name in MATLAB. For instance, using the variable name disp and then trying to return this variable will generate this error. To fix this, choose variable names that are not reserved names used by MATLAB. See the MATLAB online help or user manual for a list of reserved function names.
    This error can also be generated if the Clear All function is used in your MATLAB script. To resolve the error, simply remove this function from your script. For more information on creating and using MATLAB scripts in LabVIEW, refer to LabVIEW's VI, Function, & How-To Help.
    Hope this helps,
    Isabelle
    Ingénieur d'applications
    National Instruments France

  • Why does Content Encoding Error appear always, even when home page is selected?

    The Question summarizes the problem that is prevelant in thousands of Firefox downloads as witnessed by the same thousands of people in your Question Forum. You must know what the heck is causing this and how to fix it. Version numbers are meaningless. This problem appeared last year and no cache clearing or cookie cutting or re-downloading or anything else will fix it. Why do you do nothing to solve this error?? I don't like IE8 but I have no choice, I need a working browser.

    I think I found something. When loading a web page it's looking for 128 bit (or something like that) encryption. An example that works every time: If I type java.com in the address bar I get that "Content Encoding Error" box.
    If I type http://www.java.com I get the same thing.
    If I type https://www.java.com It works
    The same thing happens with other sites. A few have http and still work. the ones that don't work but I change the address to start with https load properly. Ok maestro what gives? and how to make it work all the time?

  • Why does Adobe Air Captive Runtime require Internet Access on Android?

    I am developing a children's app on Adobe Air and just learned that the Internet permission is being forced by Adobe Air. The only comment I saw on these forums was from someone stating it was so the Adobe Air App can communicate to the Adobe Air package, which doesn't make much sense-- but even still, I am bundling the Adobe Air Runtime within the App itself.
    This affects me because as a children's app, some of my customers (e.g. Parents) will see the requirement of an Internet connection as a bad sign, in that my app may be loading content from the internet, or collecting data about their child or device and sending it over the internet.
    I think Adobe should be clear as to why their platform requires internet access. Thank you.

    I have the same problem. i have tired AIRSDK 3.1 & 3.4, my app can run normal without Captive-runtime mode in my nexus s, But keep getting the message "unfortunately, (myappname) has stopped" when packed with Captive-runtime.

  • Why does my itunes generated "purchased" playlist differ between different computers for the same library?

    One computer (my newer one with Lion) doesn't have any music before 7/2008 included as "purchased" but still has all the music in the general library that the other computer has listed in the "purchased" playlist (going all the way back to 2006) automatically generated by itunes. The other computer (the one with the correct purchased playlist) only has snow leopard but apparently can still work with the cloud as it has all the new downloads/purchases that have been completed on the other computer. Is this related to the Itunes plus thing - are all the songs before 7/2008 or whatever the date is not itunes plus and that's why they are not showing up as purchased in one computer? I think I can fix this by creating a special playlist of my own to sync between the two of them, but it would be nice to have both purchased lists be accurate for the synced library. Any thoughts or suggestions would be appreciated.

    You can transfer iTunes content from an iTunes library on a single computer only.
    Since these songs were purchased with the same iTunes account, you can download the song that is not in your iTunes library on the computer you will be syncing your iPhone with. Or you can download the song or songs direct on your iPhone.
    http://support.apple.com/kb/HT2519?viewlocale=en_US&locale=en_US

Maybe you are looking for

  • Last line is still not read

    Hi, I fixed error in last post and rewrote the code using ProcessBuilder instead. Output from my unix tool is: Command is a shell application' /home/myid/test/myshell/bin/run' that starts a ascii gui that looks like ( see below). It waits for input f

  • Bridge CS6 hangs on Win 7 Pro

    I havethe following error, this occurs when I click on a directory lookup in bridge.  It hangs and must be closed.   This is a new clean bridge install on and Intel DX55kG MB with an i7 Faulting application name: Bridge.exe, version: 5.0.0.399, time

  • How to separate BPM 11g from ADF

    Hi all, we are facing with a huge issue about how to separate BPM 11g ADF Task page components from SOA/BPM to a new non-soa ADF managed server. We are ready to move on pre-production server from development enironment and the new environment has two

  • No signal after updating to 31.0.015

    I have just updated my firmware to 31.0.015 I canot get a signal since I have updated the firmware ! how can I fix this ?

  • Phantom picture appearing briefly after accessing iPhone with Touch ID or Enter Passcode

    Hello everyone, When I access my phone using touch ID, an image that was deleted a long time ago appears for a second then vanishes before my icons and apps show up. This happens randomly. I have deleted the picture and went into the recently deleted