Calling new Object not working... (or whatever it is, hard to understand)

Hi,
I got 2 classes, one is creating an object referring to the other, however, it doesn't seem to work...
I got this:
Screen s = new Screen();Which should call public void Screen() in a class named Screen, right? Well... it doesn't...
This is the Screen void in the Screen class:
    public void Screen() {
        System.out.println("screen called");
        GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
        System.out.println("vc setting");
        vc = env.getDefaultScreenDevice();
        System.out.println("vc set");
    }Please help me out! I'm getting a NullPointerException after a while and that is caused by Screen not being used...
Thanks

Just to elaborate, a valid constructor MUST have the same name (case sensitive) as the class and have no (different from void) return type. IOW, void as a return type is still a return type. So you can call the method 'void ClassXXX', but it is not a constructor, and you'd need to have an instance of THAT class in order to call the method ... unless the method was static, but I won't go there for now.
Oh, okay I see you got it.
Edited by: abillconsl on Jan 8, 2010 8:54 PM

Similar Messages

  • I have a new iPhone 5 version 8.1 - incoming caller ID does not work and I cannot send or receive SMS messages

    I have a new iPhone 5 version 8.1 - incoming caller ID does not work and I cannot send or receive SMS messages. ISP says everything is active on their side. I have just upgraded from Samsung with the same phone number and services. Help?

    Hi cggturner,
    I'm sorry to hear you are having issues with iOS 8.1. If you are still having issues with Caller ID and SMS Messaging, you may find the troubleshooting steps outlined in the following article helpful:
    iOS: Troubleshooting Messages
    Regards,
    - Brendnen

  • Why copy option from recent call numbers is not working on ios7 [recent call logs in phone]?

    why copy option from recent call numbers is not working on ios7 [recent call logs in phone]?

    Here is a copy of my expressions and a copy of my data. The expressions match up going from left to right
    Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4"))
    sum(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4")))
    count(Code.CalcPTD2(Lookupset(FORMAT(Fields!REALDATE.Value,"Long Date"),FORMAT(Fields!CallbackDate.Value,"Long Date"),Fields!DailyHours.Value,"DataSet4")))
    PUBLIC SHARED FUNCTION CalcPTD2(LookupArray AS OBJECT) AS INTEGER
         DIM i,Total AS INTEGER
         Total = 0
         FOR i = 0 to UBOUND(LookupArray)
               Total = Total + CINT(LookupArray(i))
         NEXT i
     NumberTimes  =   NumberTimes +1
    RETURN  Total
    END FUNCTION

  • Subscription to call Montenegro is not working.

    Hi I just bought another 9.99e subscription to call montenegro but when I try calling it's not working, what's happening ? Help plz
    This post was transferred from its previous location to create its own new topic here; its subject and/or title has been edited to differentiate the post from other inquiries and to reflect the post's content. A link to this post appears where the post was originally added.

    Dajana11 wrote:
    Hi I just bought another 9.99e subscription to call montenegro but when I try calling it's not working, what's happening ? Help plz
    Hello
    You purchased a Montenegro 60 mins Subscription on July 21st 2014 and used your full allocation of 60 minutes. You then purchased a further 60 minutes on July 30th 2014. As this is a monthly plan your newly purchased minutes will be added at or about midnight UTC/GMT on August 21st 2014. If you wish to add additional minutes before the monthly anniversary of your plan you have to purchase a different # of minutes (if that option exists).
    TIME ZONE - US EASTERN. LOCATION - PHILADELPHIA, PA, USA.
    I recommend that you always run the latest Skype version: Windows & Mac
    If my advice helped to fix your issue please mark it as a solution to help others.
    Please note that I generally don't respond to unsolicited Private Messages. Thank you.

  • Javascript calls via getURL not working anymore

    After upgrading to flash player 9,0,115,0 a simple call like
    getURL("javascript(alert'message')); doesn't work anymore on
    Internet Explorer (it fails without any error in policyfiles.txt,
    but it still work on Firefox). My IE version is 7.
    I can't use ExternalInterface 'cause i need to publish as
    Flash Player 7 AS2.0.
    Any comment or suggestion?

    I have a similar problem. When running a local HTML file,
    using IE7 and FP 9,0,115,0, all the getURL function calls cease to
    work.
    If I downgrade to FP8, still using IE7, everything works.
    If I downgrade to IE6, still using FP9.0.115.0, everything
    works.
    If I load the HTML via HTTP (instead of local), using IE7 and
    FP9.0.115.0, everything works.
    If I use Firefox, with FP9.0.115.0, everything works.
    So, the function calls fail only when the swf is contained on
    a
    local HTML file, using
    IE7, and
    FP9.0.115.0. The problem is, most of our customers have that
    software profile, and all of them need to load the content locally
    (its very heavy for network transmission).
    All the getURLs are like this:
    getURL("javascript:someFunction()");
    We're setting the 'allowScriptAccess' to 'always'.
    Also, if we put the OBJECT tag inside the HTML (instead on an
    external JS file), the function calls still do not work.

  • My caller speaker is not working

    My caller speaker is not working, I can hear the person on the other side but they can't hear me, but when I activate the speaker phone then they can hear me please help me why is this happening is it the software or my speaker???

    Tobie19 wrote:
    My caller speaker is not working, I can hear the person on the other side but they can't hear me, but when I activate the speaker phone then they can hear me please help me why is this happening is it the software or my speaker???
    Whatever mode you are in, them hearing you has nothing to do with speakers. The microphone is working only in loudspeaker mode, therefore hardware is OK. 

  • Loudspeaker and call button is not working in my n...

    sometimes the green button i.e the call button is not working i am not able to call to the no. that are present in my contacts and also loudspeaker also wont work is there any solution plz help

    check whether new firmware is exists in your region and update your phone with the latest one. probably it will help to solve your problems.

  • Quicktime objects not working on GoLive

    I have a GoLive CS2 Student Version. My Quicktime Objects are not working. I tried to drag the track objects to the page or to layer and no avail.
    Can you help me? I spent a whole day to finally figure out the Quicktime objects not working.

    Thank you for the support John,
    To explain what I am doing in more detail: I am basically making an image gallery with thumbnail buttons of each image. When the user enters this page I want to have the automatic slideshow of a few images. Then the user have the option to click on the buttons to see the images. I was able to make a slideshow in GoLive. But the transition is abrupt. According to the GoLive Help Menu there is a way to make the trasnition smoother using the timeline editor, but it is too difficult to follow up for me. So I downloaded another program called SWFn'Slide which was very easy to make the smooth transitional slideshow. Now I am trying to insert the SWF file into my page. But I can't figure out how to do it. In my understanding, I must place a layer on the page and on that layer I must place the SWF track from the Quicktime Objects tab. But I cannot drag any of the Quicktime Objects tools into the page. Again I am having a problem inserting a SWF file into the page.

  • HT4623 my voice call services is not working with cellular network...only works fine with wifi..please help?

    my voice call services is not working with cellular network...only works fine with wifi..please help?

    Since you have already done some sort of reset on your Airport Express, you might as well make sure it was a "hard reset" - follow the instructions for a hard reset found at:
    http://docs.info.apple.com/article.html?artnum=108044
    Since your Mac is running Leopard, you need to configure the Airport Express using the Airport Utility found in the Applictions->Utilities folder. You cannot install the old software that was supplied on the CD you got with the Airport Express.
    In future - if you do something bad with network settings on your Mac, do NOT try to fix it with the Airport Utility. The Airport Utility is only used to configure the Airport Express - and since the problem you have created is on the Mac and not the Airport Express, there is no need to be using the Airport Utility and especially there is no need to be resetting the Airport Express.

  • How do u get a Java method to call itself? Not working here.

    How do u get a Java method to call itself? Not working here. I am using the "this" keyword. Thanks.
    Below, I would like to call checkIt method in itself.
    Ex.
    public class ABC {
    public String checkIt(String abc){
    if....
    checkIt(abc);
    }

    Assuming you are getting stack overflows (likely if you're unfamiliar with recursive calls), you need to put some sort of check condition inside the method so it doesn't call itself endlessly (AKA "infinite recursion").

  • Call log does not work. Iphone 4

    Hi, I'm an Iphone 4 user, software currently on IOS 6.1.3, updated a couple of weeks ago.
    Everything's fine and all, though one major problem that's been persisting - the call history is not working. Whenever an oncalling call (regardless if it's someone in my contact list or not) comes, the call log does not record the number and the entire log remains blank. I've tried resetting the settings as well as 'hard reset', but neither of these two have worked.
    It's become absolutely frustrating, especially when I sold items off at Trademe and can't even track the phone numbers of anyone that gives a call saying they want to buy something (for the moment, I've currently got all pages saying that anyone interested should text my number, but as always, someone ignores that and just calls anyway). Not to mention it makes it a particularly big headache for work purposes as well and it obviously can't go on like this forever.
    It'd be really appreciated if anyone can come up with a solution that can resolve this issue.
    Thanks. 

    meehow wrote:
    ..I just upgrade my E52 from 034.001 to 052.003 and noticed that 'call log' function does not work anymore. The symptom is that nothing happens when pressing:
    - "green" call button,
    - Log option from the main menu,
    - missed calls from the desktop.
    I had to switch the phone to active Standby Mode which I never used before - this is the only way to see missed calls - the small "pop up" on the desktop.
    Any suggestions how to fix it? Is it a known issue?...
    I don't know how widespread your experience is but it is not universal as all the functions you describe work correctly for me with an E52 and 052.003 firmware.
    Even if the upgrade reverted the log settings for Log Duration to "None" the "Green" key and the Log menu icon should bring the log up but with it empty, of course.

  • MY FIREFOX NEW TAB NOT WORKING NIETHER WITH + NOR WITH RIGHT CLICKING ON TAB OR DOUBLE CLICK ON TAB

    MY FIREFOX NEW TAB NOT WORKING NIETHER WITH + NOR WITH RIGHT CLICKING ON TAB OR DOUBLE CLICKING ON TAB

    '''Try Firefox Safe Mode''' to see if the problem goes away. [[Troubleshoot Firefox issues using Safe Mode|Firefox Safe Mode]] is a troubleshooting mode that temporarily turns off hardware acceleration, resets some settings, and disables add-ons (extensions and themes).
    If Firefox is open, you can restart in Firefox Safe Mode from the Help menu:
    *In Firefox 29.0 and above, click the menu button [[Image:New Fx Menu]], click Help [[Image:Help-29]] and select ''Restart with Add-ons Disabled''.
    *In previous Firefox versions, click on the Firefox button at the top left of the Firefox window and click on ''Help'' (or click on ''Help'' in the Menu bar, if you don't have a Firefox button) then click on ''Restart with Add-ons Disabled''.
    If Firefox is not running, you can start Firefox in Safe Mode as follows:
    * On Windows: Hold the '''Shift''' key when you open the Firefox desktop or Start menu shortcut.
    * On Mac: Hold the '''option''' key while starting Firefox.
    * On Linux: Quit Firefox, go to your Terminal and run ''firefox -safe-mode'' <br>(you may need to specify the Firefox installation path e.g. /usr/lib/firefox)
    When the Firefox Safe Mode window appears, select "Start in Safe Mode".<br>
    [[Image:Safe Mode Fx 15 - Win]]
    '''''If the issue is not present in Firefox Safe Mode''''', your problem is probably caused by an extension, theme, or hardware acceleration. Please follow the steps in the [[Troubleshoot extensions, themes and hardware acceleration issues to solve common Firefox problems]] article to find the cause.
    ''To exit Firefox Safe Mode, just close Firefox and wait a few seconds before opening Firefox for normal use again.''
    When you figure out what's causing your issues, please let us know. It might help others with the same problem.

  • I just got the iPhone 5.  It's completely synced and working.  All my contacts are loaded.  However, caller ID is not working when I receive a call or a text.  Can anyone help me out with this?

    I just got the iPhone 5. It's completely synced and working.  All my contacts are loaded.  However, caller ID is not working when I receive a call or a text.  Can anyone help me out with this?

    Well, assuming all of the above, Notifications, etc., it just might be time for a visit to the Apple tore genius center for a session with the techs.  See if it is a fault in the hardware or just an iOS reinstall is the answer.
    One more thing you could try, backup so you have a record of content, then restore to factory conditions be an Erase All Contents and Settings.  Then restore from the backup you just made.  That has helped some with WiFi problems, may be it would work with your problems.
    But with that behavior of another app with problems, the geniuses looks like a less stressful thing to do.

  • 1.call information such as call waiting,call forwarding, call holding is not working when caller the call me or im wait for my call i cant see any title by iphon , and also holding is the same.2. there is not any option for call baring.

    Hi. please solve my problem.
    .call information such as call waiting,call forwarding, call holding is not working when caller the call me or im wait for my call i cant see any title by iphon , and also holding is the same.2. there is not any option for call baring.3.playback music is not hearing by second partner during the call.4.i cant select ringing ton from saving tons.
    thank you in advance.

    Hi Ersin,
    Exception 1 would seem to be FORMATTING_ERROR, which suggests something in the design of the Smartform.  However, that doesn't fit with the form being generated from a report, but only erroring when called from a function module.  I can think of no reason why the different calling method would be a factor.
    When FORMATTING_ERROR is raise it should also set a message ID and number, are you able to determine what they are?
    Regards,
    Nick

  • I own the 4s and my BT Planttronics Pro works fine with calls but does not work to listen to music? Any ideas on how to correct this?

    I own the 4s and my BT Planttronics Pro works fine with calls but does not work to listen to music?
    Any ideas on how to correct this?
    Thanks-Vitaleyes

    I don't know what they call it, but my plantronics voyager pro, and my wifes plantronics voyager pro+ will not let you hear music through the headset.  My Blueant T1 does support it and plays the music through the deadset.

Maybe you are looking for