How to show a picture in a frame?

I've created a class to create some frames and i'm trying to show these pictures on the frames using this class.
Can someone help me or give me an example?
Thanks
Alex

hi,
you should override the paint method and then in the paint method do a g.drawImage(image, xPos, yPos, null); where g is a Graphics object, image is an object of type Image, xPos and yPos are the x coordiate and y coordinate locations where the image is to be drawn on the frame.
eg
public void paint(Graphics g)
      g.drawImage(image, xPos, yPos, null);
}hope that helpz
cheerz
ynkrish

Similar Messages

  • How to show a picture both on client and server at the same time (X11?)

    Hi Guys
    I want show a picture on my client as well as on the server(in another location) at the same time, pretty much like showing something both on laptop and on a projector. Assume I have a picture sssss.jpg on the server A1, if I want to open that picture to my client, I can simply to do the following from client A2:
    xhost A1
    telnet to and login A1
    setenv DISPLAY "ipaddress of A2":0.0
    Anyone can direct me how to show picture the client that I am sitting at an also show on the server at the same time?
    Thanks

    VNC would let you do that. With a shared connection, both machines could run a VNC client to the same session.
    Darren

  • How to show the picture only true the triangles?

    ALright, i have this photo and got a bunch of triangles on top of this photo.
    I only want to show this picture true these triangles and cut the parts of the photo that is not under these triangles.
    How should i do this?
    thanks

    1. Select the triangles. (Make sure they are closed paths.)
    2. Object>CompoundPath>Make.
    3. Select the Compound Path and the photo. Object>ClippingMask>Make.
    JET

  • Show a picture in a frame

    Please Is there somebody who's help me out?
    I'd like show a picture thats have an extension like .jpg, How Can I do this? My email is [email protected] or [email protected]
    Thanks.

    I would read up on the basic Swing tutorials. In the mean time, here is a good example:
    import javax.swing.*;
    import java.awt.event.*;
    public class TheBigOne {
      public TheBigOne() {
        //does nothing!
      public static void main(String[] args) {
        System.out.println("Starting...");
        JFrame theBigOne = new JFrame("Test Window");
        theBigOne.setDefaultLookAndFeelDecorated(true);
        ImageIcon pic = new ImageIcon("C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Winter.jpg");
        JLabel p = new JLabel(pic, JLabel.CENTER);
        p.setOpaque(true);
        theBigOne.setLocation(0, 0);
        theBigOne.getContentPane().add(p);
        theBigOne.pack();
        theBigOne.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        theBigOne.setVisible(true);
        System.out.println("Ending...");
    }  Hope that helps you get started.

  • How to show a picture from my database (BLOB field) Oracle into my JSP

    Hi all, i got a problem trying to show a picture in my JSP.
    I have a servlet which loads my picture, the problem is that i dont know how to set into a session// session.setAttribute("xxx","aaa") // or if there is another way to set it up, in order to show it in my JSP, if someone could help me i really appreciate it... thanks

    The way you include it in your jsp is the standard way you download any image.
    With an image tag
    <img src="myImageServlet?imageId=42"/>
    and your imageServlet actually returns the picture via its output stream.
    ie it makes 2 requests. One for the jsp page, and then when it receives and parses the html, one to the servlet to get the image.

  • HOW TO SHOW A PICTURE IN A FORM WITH PORTAL

    I want to show in page's form a picture where the path is in the database
    how can i show the picture ?

    Hi,
    Which version of portal are u using ?? You could make use of Intermedia Support that has been added extensiverly to various application components like Reports to fetch data(various formats) from the database and display/edit/insert it.
    Incase U are using 309.x you could write your own custom procedure .Check this link :
    Re: Unable to download Oracle JDeveloper 10g
    Domain controller is not comming up.
    Thanks,
    Anu

  • How to Insert picture in Database & how to Show this picture in Report/form

    Hi
    I have create a table and want to insert picture in this table in Blob format and also want to show this picture in Form / Reports
    Regards
    Shahzaib ismail

    Hi Shahzaib,
    create table
    graphics_table
    bfile_id number,
    bfile_desc varchar2(30),
    bfile_loc bfile,
    bfile_type varchar2(4)
    SQL> INSERT INTO graphics_table
    2 VALUES(4,'April Book of Days Woodcut',bfilename('GIF_FILES','APRIL.JPG'),'JPEG');
    1 row created.
    In this way you can inserrt picture inside the database.
    Regards
    Rajat

  • How can I show 2 pictures in one frame either in an IPhoto '11 slide show or IMovie '11

    I'm trying to put two pictures side by side in one frame of either a slideshow or movie (for my brother's wedding, a picture of him and his fiance at the same time in their lives growing up)-how can I do this?  I have tried PIP in IMovie, but I'm not having much luck.

    Bizarro:
    Welcome to the Apple Discussions. JMEH has suggested the best way to get what you want. Create a blank 8.5 x 11 canvas at the dpi size that your camera produces. Mine Canon gives me 180 dpi. Then, using PS as iPhoto's primary editor, crop the file to the size you want and drag it into the open blank canvas and position it where you want. Just make sure in PS that the dpi is set to 180 (or whatever you choose to use). Once dragged into the blank canvas the changes to the file, i.e. crop, does not have to be saved and you can close that file without making any permanent changes. Do that for each of the photos you want on the blank canvas, arrange and print. When done you can close the canvas without saving for use the next time.
    Do you Twango?
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've written an Automator workflow application (requires Tiger), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.

  • How to show new page in html frame in JEditorPane

    In JEditorPane when hyperlink is clicked
    <br>Home <br><br>
    "target" ignored, new page opening without frames, what have I to do?
    I use hyperlink listener like this:
    void jEditorPane1_hyperlinkUpdate(HyperlinkEvent e)
    try
    jEditorPane1.setPage(e.getURL());
    m_urlStack.push(m_current);
    m_current = e.getURL();
    catch(Exception e1)
    JOptionPane.showMessageDialog(this, "Page not found.");

    As per my understanding, You want to just redesign your list form. You can achieve the same using SPD2010 or you can use jQuery also if you don't have rights for SPD customization.
    Create
    a custom list form using SharePoint Designer
    SharePoint
    form: present fields side-by-side
    Thanks.

  • How to show the cursor in text frame?

    I need to enable the type tool (cursor tool )  in a particular text frame.... Please help me!

    Hi,
    Set selection to this textFrame.insertionPoints - any of them, lets say the first one.
    app.selection = mTextFrame.insertionPoints[0];
    Jarek

  • Does anyone know how to add multiple pictures to a single frame in iMovie?

    Does anyone know how to add multiple pictures to a single frame in iMovie?

    Maybe you would be better off posting this in the iPhoto or iDVD categories of the forums.
    http://discussions.apple.com/category.jspa?categoryID=143
    http://discussions.apple.com/category.jspa?categoryID=128
    The answer to your question depends on what you ant to do with the DVD.
    Do you want a DVD menu, slide show etc.
    iPhoto will allow you to burn straight to a DVD. Just select the album you want to burn then go to share in the tool bar and select Burn.

  • How to extract any picture (frame) from the video file

    I am writing an application that is going to show the grid of tiles. Each tile should have picture that is frame from some particular video.
    Basically something similar to Photos or Videos - standard Windows Phone app.
    The question is how can i extract any picture from the video to put it as picture of the tile or button?

    I pinged you offline.
    Matt Small - Microsoft Escalation Engineer - Forum Moderator
    If my reply answers your question, please mark this post as answered.
    NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
    objects and unknown namespaces.

  • How can I import pictures from my iphone to PC which I imported to the iphone from another PC? The folder doesn't show on my computer. I see all other pictures I took with the phone but not the imported folder.

    How can I import pictures from my iphone to PC which I imported to the iphone from another PC? The folder doesn't show on my computer. I see all other pictures I took with the phone but not the imported folder.

    Photos that were synced from a computer won't show for copying to a computer. If you want to copy them back then you will need a third-party app on your phone such as Simple Transfer which can copy them off via your wifi network. But photos are 'optimised' when they are synced to a device, any that you then copy back to a computer may not be exactly the same as they originally were on your computer (e.g. their dimensions might be different and their colours may look a bit different).

  • How do I enforce "Show My Picture" instead of "Hide My Picture" in Lync Server 2013?

    I was scouring TechNet and the web for a script that could perform the same task as one that I previously used for Lync 2010.
    In Lync 2010, we had already used Lync policy to enforce that only the Active Directory photo could be used. One thing that we couldn't set via policy however was the ability to complete remove the "Hide My Picture" option in Lync 2010 client.
    This left users with the ability to freely switch between showing the Corporate photo or no photo. I did eventually find and make use of script that constantly checked for this setting switch, then switched all users back to the desired "Show My Picture"
    setting. I don't recall who wrote it, but it's easy to find on technet. As we started to move more and more users to our Lync 2013 enterprise pool, I noted that even though the script was running, the setting seemed to be changeable. A closer look revealed
    that the script didn't function correctly against SQL for our 2013 pool.
    I took the concept and applied it to Lync Server 2013 after studying the differences in Userdata. In Lync 2013, because UserData is in .zip, you need to convert it to 2010 format XML to use logic intended for Lync 2010. My script will extract 2013 data,
    convert it to 2010, query for users who are set to "Hide My Picture" and then export any guilty users to an edited2010 XML. The script then converts this to 2013 Format .zip, and uploads the data for these users only. I chose to use Update-CSUserData
    insted of Import-CSUserData as this avoids having to restart my Front End. I then use a scheduled task on my Front End server which runs this script every hour.
    Please note: You can use this script, but I guarantee nothing about it's functionality, and I am not responsible for how you positively/negatively use it. You should always test things in a Lab Environment. Furthermore, this script was run on a relatively
    smaller Enterprise system in which we are by default set to "Show My Picture" and already assigned as part of our user policy the ForceADPhoto attribute. This means that running the script is less intensive on my FE than say on a FE with 10,000 users
    where none of the users were set to "Show My Picture". Please keep this in mind when planning to execute against your FE. You may want to edit my script and insert the -UserFilter or -WhatIf in the Export-CsUserData UpDate-CsUserData.
    Anyways, I hope this solves the similar issue for many of you Lync 2013 administrators. Please feel free to share my work with others if it does, and also give this post some good feedback and/or mark my post as the answer to your problem.
    Alas, here's the script (save it as a .ps1 , i.e. ForceShowMyPicture.ps1)
    #Lync 2013 ForceShowMyPicture - Compiled by Octavio A. Serpa (Octavio-Admin on TechNet)
    # Import Lync Module
    Import-Module “C:\Program Files\Common Files\Microsoft Lync Server 2013\Modules\Lync\Lync.psd1"
    ###Variables To Set
    #This variable is a folder where files will be temporarily written
    $folderPath = “C:\Lync2013Scripts\Export”
    #This is the FQDN of the pool in which the users you want to target reside
    $poolFQDN = “<lyncpool.domain.local>”
    ###Done
    #Message Out
    Write-Host -ForegroundColor YELLOW “CHECKING THAT TEMP EXPORT FOLDER PATH EXISTS"
    If (-not (Test-Path "$folderPath" -pathType container))
     "ERROR: Your Export Directory doesn't exist!"
     Exit
    Write-Host -ForegroundColor Green “TEMP EXPORT FOLDER DOES EXIST"
    Write-Host -ForegroundColor YELLOW “PRE-CLEANING OLD EXPORT/IMPORT FILES"
    If (Test-Path "$folderPath\Lync2013UserData.zip") { Remove-Item "$folderPath\Lync2013UserData.zip" }
    If (Test-Path "$folderPath\Lync2010UserData.xml") { Remove-Item "$folderPath\Lync2010UserData.xml" }
    If (Test-Path "$folderPath\Lync2010EditedUserData.xml") { Remove-Item "$folderPath\Lync2010EditedUserData.xml" }
    If (Test-Path "$folderPath\Lync2013EditedUserData.zip") { Remove-Item "$folderPath\Lync2013EditedUserData.zip" }
    Write-Host -ForegroundColor Green “PRE-CLEANING COMPLETED SUCCESSFULLY"
    #Message Out
    Write-Host -ForegroundColor YELLOW “EXPORTING LYNC 2013 POOL USER DATA”
    Export-CsUserData -PoolFqdn $poolFQDN -FileName $folderPath\Lync2013UserData.zip
    Write-Host -ForegroundColor Green “EXPORT COMPLETED SUCCESSFULLY"
    #Message Out
    Write-Host -ForegroundColor YELLOW “CONVERTING LYNC 2013 USER DATA TO 2010 FORMAT”
    Convert-CsUserData -InputFile "$folderPath\Lync2013UserData.Zip" -OutputFile "$folderPath\Lync2010UserData.xml" -TargetVersion Lync2010
    Write-Host -ForegroundColor Green “CONVERSION COMPLETED SUCCESSFULLY"
    #Message Out
    Write-Host -ForegroundColor YELLOW “CHECKING THAT FORMAT CONVERSION WAS SUCCESSFUL AND .XML EXISTS”
    If (-not (Test-Path "$folderPath\Lync2010UserData.xml" -pathType leaf))
     "ERROR: Verify that $folderPath is writable!"
     Exit
    Write-Host -ForegroundColor Green “CONVERSION COMPLETED SUCCESSFULLY"
    #Message Out
    Write-Host -ForegroundColor YELLOW “LOADING XML”
    $d = [xml] (Get-Content "$folderPath\Lync2010UserData.xml")
    Write-Host -ForegroundColor Green “XML LOADING COMPLETED SUCCESSFULLY"
    #Message Out
    Write-Host -ForegroundColor YELLOW “CORRECTING AD PHOTO SETTING”
    $changes = 0
    $lastProcessedUser = $null
    foreach ($hr in $d.HomedResources.HomedResource)
     $found = 0
     foreach ($c in $hr.Containers.Container)
      foreach ($p in $c.Publication)
       If ($p.CategoryName -eq 'contactCard' -and $p.InstanceNum -eq 6 -and $p.Data.contactCard.displayADPhoto -eq 'false')
        If ($hr.UserAtHost -ne $lastProcessedUser)
         "$($hr.UserAtHost) reset"
         $lastProcessedUser = $hr.UserAtHost
        $p.Data.contactCard.displayADPhoto = 'true'
        $p.Version = (([int] $p.Version) + 1).ToString()
        $p.PrevPubTime = $p.LastPubTime
        $p.LastPubTime = (Get-Date -Format s).ToString()
        $found = 1
        $changes++
     If ($found -eq 0) { [Void]$d.HomedResources.RemoveChild($hr) }
    Write-Host -ForegroundColor Green “AD PHOTO SETTING CORRECTIONS COMPLETED SUCCESSFULLY"
    #Message Out
    Write-Host -ForegroundColor YELLOW “Changes: $changes"
    If ($changes -ne 0)
     #Message Out
     Write-Host -ForegroundColor YELLOW “RE-SAVING XML”
     $d.Save("$folderPath\Lync2010EditedUserData.xml")
    #Message Out
    Write-Host -ForegroundColor YELLOW “CONVERTING LYNC 2010 .XML BACK TO 2013 .ZIP FORMAT"
    Convert-CsUserData -InputFile "$folderPath\Lync2010EditedUserData.xml" -OutputFile "$folderPath\Lync2013EditedUserData.zip" -TargetVersion Current
    #Message Out
    Write-Host -ForegroundColor Green “CONVERSION BACK TO 2013 .ZIP FORMAT SUCCESSFUL"
    #Message Out
    Write-Host -ForegroundColor YELLOW “IMPORTING LYNC 2013 POOL DATA FOR CORRECTED USERS”
    Update-CsUserData -FileName $folderPath\Lync2013EditedUserData.zip -Confirm:$false -Verbose
    Write-Host -ForegroundColor Green “IMPORT COMPLETED SUCCESSFULLY"
    Write-Host -ForegroundColor YELLOW “STARTING POST-IMPORT-CLEANUP OF EXPORT/IMPORT FILES"
    If (Test-Path "$folderPath\Lync2013UserData.zip") { Remove-Item "$folderPath\Lync2013UserData.zip" }
    If (Test-Path "$folderPath\Lync2010UserData.xml") { Remove-Item "$folderPath\Lync2010UserData.xml" }
    If (Test-Path "$folderPath\Lync2010EditedUserData.xml") { Remove-Item "$folderPath\Lync2010EditedUserData.xml" }
    If (Test-Path "$folderPath\Lync2013EditedUserData.zip") { Remove-Item "$folderPath\Lync2013EditedUserData.zip" }
    Write-Host -ForegroundColor Green “POST-IMPORT-CLEANUP COMPLETED"
    #Message Out
    Write-Host -ForegroundColor Green “AD PHOTO SETTING SUCCESSFULLY UPDATED"

    When I try to run this I get the follow error.  Any thoughts?
    Update-CsUserData : Unable to cast COM object of type 'System.__ComObject' to interface type
    'Microsoft.Rtc.Interop.User.ICsUserManagement'. This operation failed because the QueryInterface call on
    the COM component for the interface with IID '{D5ADD966-BDC3-4A8F-BFE8-6A59A9F74CB2}' failed due to the
    following error: Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
    At C:\Lync2013Scripts\ForceDisplayPhoto.ps1:113 char:1
    + Update-CsUserData -FileName $folderPath\Lync2013EditedUserData.zip -Confirm:$fal ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidOperation: ([email protected]:String) [Update-CsUserData], Invalid
       CastException
        + FullyQualifiedErrorId : Microsoft.Rtc.Management.AD.Cmdlets.ImportOcsUserDataCmdlet

  • After my friend locked me out of my iPhone with too many wrong passwords I restored my iPhone and now it is showing that picture of a cable leading towards itunes and itunes says the sim is not supported but it is the original sim. How do I fix this?

    After my friend locked me out of my iPhone with too many wrong password attempts I restored my iPhone via recovery mode and now it is showing that picture of a cable leading towards itunes, and itunes says the sim is not supported but it is the original sim. How do I fix this?

    Something went wrong with the update, this can and does happen with every version of iOS.
    There is nothing wrong with the update.
    Simply restore the device via iTunes on the computer.
    If iTunes is stating it will take hours to update, that indicates an extremely slow Internet connection and is likely the reason the OTA update failed.

Maybe you are looking for

  • Is there any other way to  limit the data a user can see

    We are using Discoverer 10.2.xxx We are running it against an Oracle applications database but we do not have Discoverer integrated with the apps. I have created database users for discoverer and granted access to the data at the db level. We have ab

  • How to enable cascade view for sites(iStore) in 11i?

    How to enable cascade view for sites in 11i?

  • Import OMF into Premiere

    Hello, How do I import OMF file into Premiere? Has Exported out OMF file from Premiere earlier and made finishing in ProTools, and will now import the OMF file back into Premiere. Is this possible? If not what is the easiest solution? We will do some

  • Adobe Reader 10.1.2 shuts down when printing/saving files

    Every time I try to print or save a pdf file, I get a message that "Adobe Reader has stopped working" and the program shuts down.  I've tried uninstalling and re-installing numerous times, but that has not helped at all. Any suggestions?

  • Distribution by ref... Pls solve

    Dear Experts, I have a similar req like below. 0fiscyear      0version      customerGRP         rev 2007              v1                  G01                  100 2007              v1                  G02                  200 2007              v1