To scan a method boolean in another method

how can i scan a boolean in another method if its true, which parameters should i take..
because the same parameter like in the boolean method leads to the error X,Y cannot be resolved..
public boolean istPunktEnthalten(int X,int Y){
          if (X>=x1 && X<=x2 && Y>=y1 && Y<=y2 ){
                return true;
          return false;
     Rechteck vereinigung(Rechteck r){
               if (istPunktEnthalten(X,Y)){      -------------->X,Y cannot be resolved, so whici param i need?
                    return r;
               }

First off, I would simplify the method like so:
public boolean istPunktEnthalten(int X,int Y)
    return (X>=x1 && X<=x2 && Y>=y1 && Y<=y2 );
}Next of all, when you call it, you don't use X, Y, you use ints or variables that hold ints:
int a = 1;
int b = 2;
System.out.println(istPunktEnthalten(a, b));

Similar Messages

  • I have a MacBook Pro with Snow Leopard. After connecting my HP Photosmart D110 to it, the printer works but the scanner doesn't. The message is"The scan cannot be performed because another program has control of the HP imaging device". Can anyone help?

    I have a MacBook Pro with Snow Leopard. After connecting my HP Photosmart D110 to it, the printer works but the scanner doesn't. The message is"The scan cannot be performed because another program has control of the HP imaging device". Can anyone help?

    Found the answer on the HP site. It's the original software that works with this printer OS X 10.6!!
    http://h20000.www2.hp.com/bizsupport/TechSupport/SoftwareDescription.jsp?lang=en &cc=us&prodTypeId=18972&prodSeriesId=3558902&prodNameId=3562006&swEnvOID=219&swL ang=8&mode=2&taskId=135&swItem=ma-60835-3

  • C7280 - Cannot scan. Error message says another program has control over the device

    I opened the HP Device Manager to do a scan. I accepted the settings and the scan started. But part way through the scan, I stopped the scan as I realized that I wanted to change the resolution. I quit the Device Manager  and restarted it but when I did, I got an error message saying:
    "The function you have requested cannot be performed because another program has control over the device".
    I don't have anything else open and so I can't work out what program has control over the printer.
    C7280 Prtinter. Mac OSX 10.7.
    This question was solved.
    View Solution.

    I was thinking that if you stopped the process in mid-scan that there may be some background processes still running. Rebooting usually stops those processes.
    No, you will not have to do this each time.  Next time, though, it may be easier to just let the scan complete and the do another scan at whatever setting you want.
    Say thanks by clicking "Kudos" "thumbs up" in the post that helped you.
    I am employed by HP

  • AV scanning choices/methods

    Folks,
    After reading a lot of the posts/documentation on the topic I am attempting to sort through the choices on virus scanning methods available for a JES instance. In my case ver 6.2-7.05
    Here are some questions:
    Q:      It looks like ClamAV is a good choice and it is apparently easy to do a channel integration with it, right?
    Q:     Does the "libclamav.so" library, now available in the recent JES release, allow one to integrate ClamAV directly into the MTA without a middle piece of software such as Amavis ? If so is this documented somewhere?
    Document ID:79481 (which is now several years old indicates the need for amavisd-new to integrate clam-av scanning via a tcp_scan channel, however
    the document also says "integration of clam-AV is open to discusssion" Once again the date of the doc is 2004.
    I am familiar with, and am using, the Sophos virus scanner via sophie using, the multiscan.sh script, and we have a license for the defs. I have also used this with the iMS 5.2 MTA, so if the MTA integration to the sophos scanner is the same as clam-av, I am inclined to go with something I am familiar with.
    Q:     Can I assume that Clam-AV might plug into the MTA in a similiar manner as listed in the admin guide (pg 451) with the below settings,
    or are these only specific to SAVSE ?
    ! for Symantex Anti-virus Scan Engine
    spamfilter1_config_file=/opt/SUNWmsgsr/config/SAVSE.opt
    spamfilter1_library=/opt/SUNWmsgsr/lib/libicap.so
    spamfilter1_optional=1
    spamfilter1_string_action=data:,discard
    ! ims-ms
    ims-ms defragment subdirs 20 notices 1 7 14 21 28 backoff "pt5m" "pt10m"
    "pt30m" "pt1h" "pt2h" "pt4h" maxjobs 4 pool IMS_POOL fileinto
    $U+$S@$D destinationspamfilter1optin virus
    ims-ms-daemon

    Hi,
    Q:      It looks like ClamAV is a good choice and it is
    apparently easy to do a channel integration with it,
    right?There are many factors to consider when implementing a virus scanning solution: cost, performance, reliability of product, number of updates etc.
    ClamAV is a good start since its free, not too much overhead, integrates cleanly, fairly regular updates.
    Q:     Does the "libclamav.so" library, now available in
    the recent JES release, allow one to integrate ClamAV
    directly into the MTA without a middle piece of
    software such as Amavis ? If so is this documented
    somewhere?As of patch -58 for JES4 messaging server, libclamav.so is provided. Documentation is available in the next releases (6.3) messaging admin guide. libclamav.so plugin communicates directly with clamd, no need for middleware.
    Document ID:79481 (which is now several years old
    indicates the need for amavisd-new to integrate
    clam-av scanning via a tcp_scan channel, however
    the document also says "integration of clam-AV is
    open to discusssion" Once again the date of the doc
    is 2004.refer above.
    I am familiar with, and am using, the Sophos virus
    scanner via sophie using, the multiscan.sh script,
    and we have a license for the defs. I have also used
    this with the iMS 5.2 MTA, so if the MTA integration
    to the sophos scanner is the same as clam-av, I am
    inclined to go with something I am familiar with.I used Sophos/Sophie anti-virus scanning combination at my previous employer. I didn't use the multiscan.sh script but wrote a virus-scanning channel which communicated directly with sophie using the sophie libraries. The channel did other things such as plugged into spamassassin for spam markup, plus stripped and replaced executable attachments. Performance was/is excellent - unfortunately I can't supply the code and I no longer have access.. sorry.
    The integration with ClamAV is much simpler, and faster. Calling out to multiscan.sh script is expensive in comparison.
    Q:     Can I assume that Clam-AV might plug into the MTA
    in a similiar manner as listed in the admin guide (pg
    451) with the below settings,
    or are these only specific to SAVSE ?You assume correctly. If you provide your email address I will send you a copy of the to-be-released integration notes. The only cost to you is feedback so any fixes that are needed can be integrated prior to releasing the final documentation :)
    Shane.

  • Somebody explain me method chaining.

    Hi.
    I'm looking for somebody to give me an explanation of how does Method Chaining (I think this is how it's called) work.
    i.e:
    myObject.setPrice(2)
    .setQuantity(10)
    .solveLifeProblems()
    .setAvailavility(true);
    Where's the theory about this?
    Can I do this with every class?
    What requisites are needed so that I can use this technique with my classes?
    What if the method, say solveLifeProblems() returns somethin strange (such as an boolean or another object)?
    Thanks.

    All you're doing is invoking a method on the return value of another method. All solveLiveProblems() has to do is return a class with a method called setAvailability.
    Sodog()
    .cat()
    .monkey();is the same as
    dog().cat().monkey();which is the same as (for example)
    Hammer hammer = dog();
    Screwdriver sd = hammer.cat();
    sd.monkey();I'd advise not formatting your code like this until you have more experience.

  • HP "another program has control of the device" Scanning Issue on Mac OSX 10.8.5

    I am running an HP C7200 series all-in-one on a Mac OSX 10.8.5 system. Everything has worked fine for years. Suddenly when I got to fax using HP Scan I get the following message: The scan cannot be performed because another program has control of the HP imaging device. This may be the result of a recent Mac update, but I'm not sure. I have tried many solutions from forums, including: restarting the program, restarting the printer while holding down the OK and Help keys, and installing RC Default Apps 2.1 and disabling the bundle extension preference. I have not yet uninstalled and reinstalled my HP software because I'm afraid something else will get messed up. 
    Also, I can scan by doing the following tedious chore. Open up the Systems Preferences, click on Print & Fax, click on Scan, Click on Open Scanner, click on Show Details, then fill in the scanning details. It's a pain compared to opening up HP Scan and clicking on scan. I can also scan via Image Capture but it also doesn't offer some of the nice features of HP Scan.
    Any other solutions?

    Hello NgnRoom,
    Welcome to the HP Forums.
    I see that you are having an issue with not being able to fax.
    As you stated , this could be caused by a Mac update.
    I suggest that we do an uninstall of the software and drivers and then while the unit is uninstalled, we then reset the printing system.  Here is a link on How to reset the printing system.  Once the reset is complete, I also suggest we Repair disk permissions.
    The next step would be to reinstall the printer on to the Mac.  Here is the link for the HP Print Drivers v3.0 for OS X.
    If the troubleshooting does not help resolve your issue, I would then suggest calling HP's Technical Support to see about further options for you. If you are calling within North America, the number is 1-800-474-6836 and for all other regions, click here: click here.
    Thanks for your time.
    Cheers,  
    Click the “Kudos Thumbs Up" at the bottom of this post to say “Thanks” for helping!
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    W a t e r b o y 71
    I work on behalf of HP

  • Can't scan-another program has control

    My HP Photosmart Studio program had suddenly stopped allowing me to scan from my Deskjet F4440. I get a message that, "The scan cannot be performed because another program has control of the HP imaging devise." I've performed the suggested fixes: restarted the program, closed all programs that might be using the device, and rebooted my computer. No luck. Any other suggestions would be greatly appreciated. Thanks.
    Using iMac, OSX, v. 10.9.4

    Hi,
    The HP Photosmart Studio is a very old software which is intended for Mac OS X v10.6 (Snow Leopard), it is not intended for newer versions as Mavericks and issues are expected..
    Unplug the printer, from the Applications folder open the Hewlett-Packard folder and select Uninstall.
    Next install the software for Mavericks by following the steps below:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03967522&cc=us&dlc=en&lc=en&os=4159&product=383...
    Once you are done, follow these steps to scan on Mavericks:
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03967506&tmp_task=useCategory&cc=us&dlc=en&lc=e...
    Regards,
    Shlomi
    Say thanks by clicking the Kudos thumb up in the post.
    If my post resolve your problem please mark it as an Accepted Solution

  • HP psc 24110 all-in-one - Problems scanning with OS X v10.5.7

    Hi, I have been using my HP psc 2410 photosmart all-in-one printer successfully for the past 10months with my MacBook Pro. I recently upgraded my OSX operating system to v10.5.7. since then my printer has been unable to scan. It will print, copy & fax. Checking the HP website shows the latest version of OS X does not support the scanning function of the psc 2410. Does anyone know how I can fix this problem or do I have to buy another scanner? Alternatively, how do I get back to the previous version of OS X which was supplied with my Computer so that I can get the scan function to work?

    Hi aviete,
    There is no full feature software and driver but you can download HP Printer Drivers for OS X. This download includes the latest HP printing and scanning software OS X Mavericks, OS X Mountain Lion, OS X Lion and Mac OS X v10.6 Snow Leopard.
    With this driver you can still print and scan, you just wont have HP software to scan from. Scanning to the computer from the printer control panel is only available when using HP Scan software, thus it will not work because there is no HP scan software as apart of the Apple Software Update driver.
    Instead, you can scan using,
    Method one: Scan from the Print & Scan window   
    Method two: Scan from Apple Preview
    Method three: Scan from Apple Image Capture 
    I hope this helps. If you have any additional questions are have any difficulty using any of these methods, please let me know what method you are trying and what the issue/error is. You may also find the following document helpful; OS X v10.9 Mavericks: Installing and Using the Printer on a Mac
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Scanned Grayscale files not loading into iPhoto

    I have just purchased a new iMac, having not been a Mac User before. I have been importing photos from an external (Windows formatted) hard drive with apparent success. However, on attempting to import some scanned jpegs (Epson Perfection V700 Photo scanner) in 8 bit grayscale, I got the "unrecognised format message". No attempt at saving on the desktop and importing into iPhoto from there worked. I then loaded them into Photoshop Elements 4 on the Mac, and saved again as a standard jpeg, but with no luck. However, by chance I tried saving with the "Embed colour profile: Epson Gray - Gamma 1.8" option unchecked in PE4's "Save as" menu. This time the resulting jpeg file did load into iPhoto. Have you any ideas why the original image did not load and what is the significance of why the "non-embedded" image did. Is there a quick way to convert these images, if necessary, using this method - I have a lot of scanned images like this. Another feature which might confirm what is wrong here is that the in Photoshop Elements, the label at the top of the displayed image shows the jpeg name, then size as a %, and then (Gray/8*). The files which load correctly into iPhoto do not show this "*" in Photoshop.

    Download and run *+Embed sRGB Profile 2+* on the grayscale photos by dropping the image files onto the Automator workflow application. You can get it from Toad's Cellar.
    This will let you avoid having to rescan those files as RGB color.

  • How to Create a Jdialog class that returns a boolean parameter

    I'm trying to subclass a jdialog to return a boolean to another callling class, the parameter is return when the jdialog closes, how do i declare such a class and what method do i call on the windowclosed event
    I'm new to java so need some code sample, the program is to implement a login and password verification.
    thanks in advance for any assistance.

    Here's another way (a third way is to make the dialog form an inner class)
    in this eg, the password is hard-coded as java
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    class MainWindow extends JFrame
      JLabel lbl = new JLabel("JLabel");
      JButton btn = new JButton("JButton");
      boolean loggedInOK = false;
      public MainWindow()
        new FTILogin_Jdia2(this, true).show();
        if(!loggedInOK) System.exit(0);
        buildGUI();
      public void buildGUI()
        setLocation(400,300);
        setSize(150,85);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        JPanel jp = new JPanel(new BorderLayout());
        jp.add(lbl,BorderLayout.NORTH);
        jp.add(btn,BorderLayout.SOUTH);
        getContentPane().add(jp);
        setVisible(true);
      public static void main(String[] args){new MainWindow();}
    class FTILogin_Jdia2 extends javax.swing.JDialog implements ActionListener
      JTextField tf = new JTextField(10);
      String password = "java";
      MainWindow mainWindow;
      public FTILogin_Jdia2(MainWindow parent, boolean modal)
        setModal(modal);
        mainWindow = parent;
        initComponents();
      public void initComponents()
        setLocation(400,300);
        getContentPane().setLayout(new BorderLayout());
        JPanel top = new JPanel();
        top.add(new JLabel("Password: "));
        top.add(tf);
        getContentPane().add(top,BorderLayout.NORTH);
        JButton btn = new JButton("OK");
        btn.addActionListener(this);
        getContentPane().add(btn,BorderLayout.SOUTH);
        pack();
      public void actionPerformed(ActionEvent e)
        if(tf.getText().equals(password))
          mainWindow.loggedInOK = true;
        dispose();
    [/code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Hp officejet 6500 won't scan

    I have a MacBook running OS X 10.9.5 and I'm using an HP Officejet 6500 series. I'm connected via USB cable. My scanner worked fine for months, now it's not working. The error message on the printer says "No Scan Options. Refer to device documentation to troubleshoot." I've gone through all the troubleshooting including uninstalling, reinstalling, and all the updating and restarts. Any idea what else I can try?

    Hi @mk168 
    I understand you are having problems scanning despite your best efforts. I'm sorry to hear that, but will certainly do all I can to help out
    There is no full feature software and driver available from HP, but the OS X v10.9 Mavericks driver for your printer is available through Apple Software Update (ASU).
    With this driver you can still print and scan, you just wont have HP software to scan from. Scanning to the computer from the printer control panel is only available when using HP Scan software, thus it will not work because there is no HP scan software as apart of the Apple Software Update driver.
    Instead, you can scan using,
    Method one: Scan from the Print & Scan window   
    Method two: Scan from Apple Preview
    Method three: Scan from Apple Image Capture 
    I hope this helps. If you have any additional questions are have any difficulty using any of these methods, please let me know what method you are trying and what the issue/error is. You may also find the following document helpful; OS X v10.9 Mavericks: Installing and Using the Printer on a Mac
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • HP Scan 3 won't work with OSX 10.9.2

    I have an HP Deskjet 3050A All-In-One and recently upgraded to a MacBook Pro with OSX 10.9.2   Printer will print but scanner will not, error message about "checking with developer for compatiblity with OS" upon attempting to open.  Latest printer scanner software listed in Apple Support for Print/Scan is Version 2.3.1 which is what I have.
    I have run softwre updates.
    Anyone have a solution?
    This question was solved.
    View Solution.

    Hi @RoscoeSweeny 
    There is no full feature software and driver available from HP, but the OS X v10.9 Mavericks driver for your printer is available through Apple Software Update (ASU).
    With this driver you can still print and scan, you just wont have HP software to scan from. Scanning to the computer from the printer control panel is only available when using HP Scan software, thus it will not work because there is no HP scan software as apart of the Apple Software Update driver.
    Instead, you can scan using,
    Method one: Scan from the Print & Scan window   
    Method two: Scan from Apple Preview
    Method three: Scan from Apple Image Capture 
    I hope this helps. If you have any additional questions are have any difficulty using any of these methods, please let me know what method you are trying and what the issue/error is. You may also find the following document helpful; OS X v10.9 Mavericks: Installing and Using the Printer on a Mac
    Hope this helps.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • I need step by step instruction for scanning

    I need step by step instruction to scan from my HP C4480 to my Mac  OSX version 10.9.4

    Hi @mehdijon 
    I can help. There is no full feature software and driver available from HP, but the OS X v10.9 Mavericks driver for your printer is available through Apple Software Update (ASU).
    With this driver you can still print and scan, you just wont have HP software to scan from. Scanning to the computer from the printer control panel is only available when using HP Scan software, thus it will not work because there is no HP scan software as apart of the Apple Software Update driver.
    Instead, you can scan using,
    Method one: Scan from the Print & Scan window   
    Method two: Scan from Apple Preview
    Method three: Scan from Apple Image Capture 
    I hope this helps. If you have any additional questions are have any difficulty using any of these methods, please let me know what method you are trying and what the issue/error is. You may also find the following document helpful; OS X v10.9 Mavericks: Installing and Using the Printer on a Mac
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Trying to scan via the paper feed of C309a to computer

    I have recently upgraded to a Macbook Air and now I'm trying to scan for the first time from the printer to the computer.  This was not a problem on my MacBook Pro.  When I open the printer window there is no 'scan' button to press, like I had before?  So what do I do to be able to scan?
    This question was solved.
    View Solution.

    Hi @Castletonway 
    I can help you scan to your Mac running 10.9.3. 
    Although there is no full feature software and driver available from HP, the OS X v10.9 Mavericks driver for your printer is available through Apple Software Update (ASU).
    With this driver you can still print and scan, you just wont have HP software to scan from. Scanning to the computer from the printer control panel is only available when using HP Scan software, thus it will not work because there is no HP scan software as apart of the Apple Software Update driver.
    Instead, you can scan using,
    Method one: Scan from the Print & Scan window   
    Method two: Scan from Apple Preview
    Method three: Scan from Apple Image Capture 
    I hope this helps. If you have any additional questions are have any difficulty using any of these methods, please let me know what method you are trying and what the issue/error is. You may also find the following document helpful; OS X v10.9 Mavericks: Installing and Using the Printer on a Mac
    I hope this resolves your inquiry.
    Please click the Thumbs up icon below to thank me for responding.
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Please click “Accept as Solution” if you feel my post solved your issue, it will help others find the solution.
    Sunshyn2005 - I work on behalf of HP

  • Officejet 4500 will not scan

    Ihave an HP Pavilion running Windows 7 Home Premium and an HP Officejet 4500  510g  all-in-one. I suddenly cannot scan from the Solution Center or from the front panel of my printer. The Solution Center first gave me an error:
     8,[(8,101,0)]. I rebooted computer and tried again, and it scanned a third of a page and froze. I downloaded the new HP Print and Scan Doctor and ran it. It showed an error when scanning the drivers(no error number). It instructed me to unplug printer power, plug it back in, reboot computer and try again.Upon doing so it , the scan doctor came back with another error and said it could not fix the issue and showed me a link to HP Support. Clicked on the link and it was the Driver downloads page. I downloaded the full driver, but have not installed it yet. First, I'd like to know if, since i have the original disc that came with the printer, should i install from the disc, or install the downloaded driver? (Both have the same date of release on them). Are they different somehow? Is one better than the other? Secondly, I'd like to know if i need to uninstall any software or drivers before i install the new one? Or will the new one just overwrite and "fix" the bad one? Thanks in advance for your help. I really appreciate it!
    P.S. If i do need to uninstall anything, Please tell me exactly what to uninstall. Thanks! 

    Hello BLKFEATHER, and welcome to the HP Forums, I hope you enjoy your experience!
    I see you are experiencing scan issues.  I would like to help.
    I would suggest Uninstalling the Printer Software.
    Once it is uninstalled, I would suggest putting your system into clean boot mode within the Microsoft configuration.  You can do so by following this document: How to perform a clean boot in Windows.
    Once the computer is in clean boot mode, I would suggest reinstalling the HP Printer Install Wizard for Windows.
    Good luck and please let me know the results of your troubleshooting steps. Thank you for posting on the HP Forums!
    Please click “Accept as Solution " if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks" for helping!
    Jamieson
    I work on behalf of HP
    "Remember, I'm pulling for you, we're all in this together!" - Red Green.

Maybe you are looking for