How to find if a Panel has anything in it?

Hi guys
I have a panel that has been painted(just like a paintbrush). say my panel is 300X500 in size, Now, I wanna go through all those 300X500 little rectangles to find out if each of them is painted or not. So, In my double forloop, each time how do I get that particular area and after I get it, how do I check if it is painted or not?
for(int a=0; a<300; a++)
   for(int b=0; b<500; b++)
      // 1. get each small rectangle
      // 2. check if it is painted(black) or white(by default)
}Any suggestions please...
Cheers
-Uday

When I drag the mouse on my panel, for each mousedrag event, i draw a square that is 3 pixels each side centered around that point (sothat the line appears thicker). After I am done with this, I wanna scan the whole panel to see what part of it is painted.
        public Graphics drawG = null;
        public Point oldpoint = null;
        public void mouseDragged(MouseEvent e)
          if(drawG==null)
               drawG = CenterPanel.getGraphics();
               drawG.setColor(Color.blue);
          int x = e.getX();
          int y = e.getY();
          Color temp = drawG.getColor();                    
          if(oldpoint==null)
               oldpoint = new Point(x,y);
          else
               oldpoint.x = x;
               oldpoint.y = y;
          drawG.fillRect(x-1,y-1,3,3);
        }Infact, I figured out a roundabout way to achieve this, But I was wondering if anyone know any straight forward solution.
Cheers
-Uday

Similar Messages

  • How to find out which user has the permission to execute startsap ?

    Hi All
    How do I find out which user has the permission to execute the startsap and stopsap? Do I control the permission on those script using windows standard authorization? For example: only allow certain user have the read and write permission?
    Thank you.!
    Vincent Lo

    Well to me this is really weird question..
    <b>noone un-authorized should have access to OS on your system</b>
    If this is valid you do not need to solve problems who can and who cannot start/stop SAP, because if you want to prevent some users from shutting down the SAP you have really hard job to do - there are many ways how to kill the SAP (for example killing relevant process from task manager, killing of database, messing with services etc.) - yes, this is harmful way of stopping SAP, but we are talking about attack, right? I would contact some Windows specialist to help you disable all the ways how to harm the running SAP. But still after that - there are many files that can be modified/deleted so SAP will crash after restart - you need to protect them too, etc.
    In case you take the first assumption as granted (and you really limit access to this server) you do not need to worry who can stop or start SAP - at the other hand it may be handy to be able to start/stop SAP from other users - for this you can run the stop/start script "under different user".
    But to answer the question - to me this is question just of access control (but really never tried that myself):
    <a href="http://technet2.microsoft.com/WindowsServer/en/library/c6413717-511e-42bd-bd81-82431afe4b2a1033.mspx">Permit or restrict access to a snap-in for a domain</a> (or see other related links down there on this page)
    Please award points for useful answers.
    Thanks

  • ADF: How to find out which query has taken what time?

    Hi,
    I have an ADF application which has many SQL queried running on each button click/page load, so how to find out which query is taking what amount of time? So that i can identify the long running queries and modify them to improve the application performance.
    Thanks in advance.

    Hi,
    As suggested by Timo,you need to start tracing on oracle.jbo package for getting the SQL queries.But I think the second option suggested by him would be better.You will have to override executeQueryForCollection method in VO Impl class .Pseudo code would be
    @Override
    Take start time
    super.executeQueryForCollection
    Take end time

  • How to find the user who has changed a field in a table

    Hello
        Someone has changed a field  cost center in my table so i need to find the user who hav changed it.Can anyone tel me how to find it.
    Regards

    HI ,
    Create a Z test program using the particular table and filed .
    Now goto SE38 and execute the program " RSDEPEND "
    give the ur test program and then execute . u will get the list of the last  change of ur program
    ( table and fields used inthis program)
    Another way :
    for data element :
    refer table 
      DD04L and get the user name
    for domain
    DD01L
    Edited by: shambhu sharan pandey on Nov 13, 2009 5:49 AM

  • How to find out which object has a specific attribute value

    Hi all,
    which is the easiest way to check in a collection of objects which object has an attribute with a specific value?
    i.e. I have n objects of classA and they all have an attribute "String value;".
    How can I check which object has that attribute set to "myvalue"?
    Thanks,
    A.

    hi,
    i don't know if this would be the best way to do it, but i would add all the instances of the objects to a hashtable with the key as the attribute with which you want to search them. You would then retrieve the object using the value.
    Cath

  • "Tag for status change alerts" - how to find out if someone has tagged you

    Dear all,
    On the "Tag for status change alerts" functionality, I was wondering if there is a way to find out if someone has tagged you for change alerts. Please let me know if I can find this out directly or by using an available tool / plugin. I am an user
    and do not have access to the lync server.
    Thanks in advance

    Doulouz is right. It is not possible to check that.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How to find if a PO has a goods receipt

    Dear Gurus,
    I am a developer with limited knowledge of the Fucntional MM module. I am working on MM purchasing.
    Now when you do a max (ebeln) on EKPO it gives the latest purchase order.
    Is there some means by which I can find out if a purchase order has a goods receipt associated with it.
    Now every time a purchase order is created the field 'wepos' is automatically set to 'X'.
    So, i dont think 'wepos' is the best way to find if the PO has a receipt.
    Now the lady I am working with has said that If you chose the PO in 'ME23N" the PO that has a receipt will have a 'purchase order history' tab.  The one that has no goods receipt will have no "purchase order history".
    Again, I have limited functional knowledge. If anybody could help me understand what fields / tables are involved in identifying the PO's; I could use that information in writing code.
    ~thanks, appreciate any advice.

    Thanks Charlie,
      I see that PO - *******147 has an entry in table EKBE, and BEWTP is 'E'
                for PO   *******157 - there is no entry in table EKBE
    PO - *******147 has a goods receipt
    PO - *******157 has no goods receipt
    Should  *******157 have an entry in EKBE and should the value of BEWTP (not equal) 'E' for this PO.
    I will be confirming this with the business before I make any changes; any other suggestions are welcomed and appreciated.

  • How to find out if someone has accessed my iclouds

    how can i find out if some one other than (me)  the owner and only authorized person has accessed my icouds account with out my authority.  is there maybe a link that notes the time and date and maybe which device, hadd accessed the account?  if theres not one then apples needs to seriously get on top of this cause i see that its not just me thats having this isue i think that a link as such wouls solve and ease so much stress and nervouseness from people,
    thanks

    I know what a screenshot is
    So why mention it in connection with accessing your phone remotely then?
    I've been using mac computers for over 30yrs.
    So? You're asking about remotely accessing your phone, aren't you?
    I know what I saw, it looked like a 'terminal view' of remote access activity
    Well, you obviously don't know what you saw, otherwise you'd be able to find it again.. but considering iOS does not contain such a view of activity, and never has, it's hardly surprising you can't find it.
    The only place where anything is logged in iOS is in Settings > General > About > Diagnostics & Usage  > Diagnostics & Usage Data - but those are not remote access logs.
    By the way, your comments are very rude and condescending.
    LOL. Hardly - I've given you facts of the situation. Nobody can access your phone remotely, and no list of remote activity exists in iOS. If you can't accept facts then you've come to the wrong place.
    But believe what you want. Doesn't bother me. I've given up trying to help you.

  • Windows Server 2008 R2 File in Use - How to find the computer that has it in use

    Lately we've been having an access database go into read only mode on our file server. When i go into the manage open files screen on the file server, it show the file being used by a functional account and the open mode is set to read. Which confuses
    me how the file can get set in read only mode when the only person who has it open has it open in read mode. Anyway, when i kick the user out of the file then the database is not read only mode anymore.  Since this is getting accessed by a functional
    account, I'm not sure who is opening it up. Is there a way to find the IP address of this person?

    To get the source IP address, you will need to enable File Share auditing: http://technet.microsoft.com/en-us/library/dd772690%28v=ws.10%29.aspx
    Otherwise, you can simply disconnect the user session.
    This posting is provided AS IS with no warranties or guarantees , and confers no rights.
    Ahmed MALEK
    My Website Link
    My Linkedin Profile
    My MVP Profile

  • How to find a SH which has multiple SPs ??

    Dear All,
    How Can I find a Ship-toParty in my system, who has multiple Sold-to-Parties.
    I am guessing this data will be available in KNVP, but was not successfully.
    Anyhelp is appreciated.
    madhu

    check KNVV table also look at the partner functins.
    Shreekant
    Edited by: Shreekant Ashkani on Jun 24, 2009 9:30 PM

  • How to find out if GR has been done

    Hi,
    We are iplementing SRM 4.0, extended classic scenario.
    We have a requirement of sending out mails(reminders) to users to perform goods receipt (confirmations). My question is if I have the PO number and the item GUID for that PO, how can I find out whether Goods Receipt has been done for that particular line item of the PO. Is there any function module which will help?
    Thanks and Regards,
    Jayesh

    Hi Jayesh,
    As a starting point, you could use FM BBP_PD_PO_GETDETAIL and BBP_PD_CONF_GETDETAIL.
    All data are stored in tables displayed in transaction bbp_pd.
    Kind regards,
    Yann

  • One time discount - how to find out if customer has aleady been given discount before?

    Client has requirement - they give first-time customers a certain discount, occasionally they give old customers the same discount (they want to be able to decide during the sales order entry).  They will enter manually with no condition records.
    They could use HA00 header discount type.. but how can they know whether that customer has received the same discount before?  Is there a standard sales report that can be run based on header conditions type?  We don't have time for custom development and would like find a standard solution.
    Is there a standard report based on order reason? Perhaps they can enter order reason for orders that have that one-time customer and can quickly run that report.
    Thanks!!

    Have you tried entering 'one time discount site:sap.com' in Google? This post is on the first result page, there are many others.
    Kindly refer to ROE and search before posting.
    @Siva - CDHDR table? Sorry, I'm confused... How exactly would it be helpful to OP?

  • How to find if a user has access to view "all_directories" ??

    A developer has complained that he cannot access view all_directories which he was able to access few days ago in production.However in development instance , he is able to query from the view all_directories.
    How to compare the two access for the same schem ain two different instance ??

    Vicky wrote:
    Ask them to provide proof (screen copy-paste or whatever) indicating the failure.Yeah , you were right, they were able to query the table, but not returning any rows. ( they flabbergasted me...). They are telling me that earlier they were able to query and get output, but they are not getting any row now ....just no rows selelctedThat makes more sense - all accessible directories for the user removed by the administrators.

  • How to find out which vendor has PO text

    I would like to pull out info about vendors and need to know which vendor has PO text, without of course having to check them one by one.
    is there any way i can see that? tables? text id??
    thanks
    Alisa

    Go to SE75 and Select EKKO or EKPO
    and Double click the EKKO or EKPO and Note the Text id..
    Then go to SE16 > STXH and enter Text ID..
    then execute , you will see the PO numbers for which the text id is maintained in 'Text Name' Column
    From EKKO table you can find the Vendor for the above PO's.

  • How to find out which GR has been invoiced?

    Hello,
    I am working on one scenario in which I am making a sales order through which automatic Purchase order is getting generated. I am doing a MIGO(GR) for lesser quantity on this PO. lets say I am creating 4 GRs of 10 quantity for a PO of 50. Now, I am making direct invoice for this through VF01 with reference to sales order. An invoice of 40 will be created.
    Now, I am doing creating one more GR of 10 for the rest of the amount. I have 5 GR's now.
    How can I get to know which GR has been invoiced (table relation) and which is yet to be invoiced?

    Amrish,
    RSEG is the "Document Item: Incoming Invoice" table. In this table, Look for the field LFBNR , LFGJA, LFPOS.
    LFBNR - Refernced GR Number
    LFGJA - Year
    LFPOS - Ref Doc Item
    Hope this helps
    Vinodh Balakrishnan

Maybe you are looking for

  • My iPhoto disappeared, how do I get it back?

    I noticed that my iPhoto has dissappeared from my Applications folder. It doesn't appear when I search in spotlight or anywhere else. How do I get it back?

  • Oracle Equivalent to SQL Server Linked Servers

    I'm trying to make that jump over to Oracle. One of the things I am doing is replicating everything I do in MS SQL 2005 to Oracle 10g. In Microsoft, I pull data from AS/400 through a linked server. I'm having trouble finding anything on the web on th

  • Business Content content problem in BI 7.0

    Hi all, We have installed here ECC 6.0 and BI 7.0 . Problem: In Business Content we hardly have any standard content which can be activated; like if we click on ROLES - we are getting only OTHER ROLES, and when we are clicking on INFOPROVIDERS we are

  • ESSO Suite Plus 11.1.1.2.0, synchronization

    Hi @ all, i try to build an evaluation sample for ESSO Suite Plus 11.1.1.2.0 and i am stuck with the synchronization between esso-lm and an openLdap directory. The openLdap schema is successfully extended and the directory is accessible over esso-lm

  • Recommend me a Mac GPU for Premiere

    We're running a couple of 2010 Mac Pro's at work. They've been good workhorses but I'm looking into a mid-life upgrade to give them some extra pep. Current specs are: 2 x 2.4Ghz Quad-Core Xeon CPUs 32GB RAM 1 TB 7200 rpm system drive, 2 TB supporting