How to add image and videos in jframeusing netbeans..

hi. im using netbeans where you can create a jframe form by just dragging and dropping items... can someone help me how to add an image? what item should i drag onto my jframe? help me pleasee...

demo:
import java.net.*;
import javax.swing.*;
public class ImageExample implements Runnable {
     public void run() {
          URL url = null;
          try {
               url = new URL("http://blogs.sun.com/roller/resources/jag/SouthParkJAG-small.png");
          } catch (MalformedURLException e) {
               throw new RuntimeException(e);
          JFrame f = new JFrame();
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f.getContentPane().add(new JLabel(new ImageIcon(url)));
          f.pack();
          f.setLocationRelativeTo(null);
                f.setVisible(true);
     public static void main(String[] args) {
          SwingUtilities.invokeLater(new ImageExample());
}

Similar Messages

  • How to store images and video clips in Oracle

    All,
    Can anyone guide me how to store the images and video clips in oracle through pl/sql and also the way to retirve it.
    Edited by: sikander on Sep 7, 2010 3:27 AM

    Some sample code
    connect sys schema  --if scott has no privs to create directory
    --where physical file store in the same machine where database load
    CREATE DIRECTORY IMAGES AS 'D:\images';
    GRANT READ ON DIRECTORY IMAGES TO SCOTT;
    connect scott/tiger
    create table my_book_diagrams (Image BLOB);
    DECLARE
      v_file_loc BFILE;
      v_diagram_loc BLOB;
      v_diagram_size INTEGER;
    BEGIN
      v_file_loc := BFILENAME('IMAGES','Layout.bmp');
      DBMS_LOB.FILEOPEN(v_file_loc );
      v_diagram_size := DBMS_LOB.GETLENGTH(v_file_loc);
      INSERT INTO my_book_diagrams (Image) VALUES (EMPTY_BLOB())
      RETURNING image INTO v_diagram_loc;
      DBMS_LOB.LOADFROMFILE(v_diagram_loc, v_file_loc, v_diagram_size);
    END;
    commit;

  • How to add Images and PDFs in MDM iView

    Hello!
    We use SAP Portal as interfase to access SAP MDM repository tables.We use MDM Record Set and MDM Item Detail iViews to display and operate with main table content.
    There is a field in the qualified table, which is the lookup to the Images table. And the other field is the lookup to the PDFs table. Both fields are qualifiers.
    In the main table there is a field, which is the lookup to the qualified table. When we try to add values to this field using Item Detail iView, we get a window, where we can fill all values of the qualified table, except Image field and PDF field - they are disabled. So, can we add Images and PDFs to the table using Item Datail iView? Or what is the other way to add them?
    Thanks,
    Vika
    Message was edited by:
            Viktoria Demina

    Ooohh... you mean, like the one mentioned in http://indesignsecrets.com/adding-zoom-and-print-to-indesign-swf-files.php?
    But they want to get paid for their hard work, the bastards!

  • I would like to know how to add images and create a slide show

    The image I try to add to my web page show up as grayed out boxes and never show up.
    I would also love to learn how to make a slide show to enhance my home page.
    Thank you!

    The easiest way is to go to:
    Insert >> Image
    This method will allow you to browse the image you want to insert.  I am, of course, assuming you have defined your site and that you have created a folder for images in line with "best practice" of good web designing.  If not, it doesn't matter because you will get a prompt to move the image to your site if it is not already there.
    Good luck anyway and post back.
    For slide show, your best option is to google for it because there are some really good scripts out there that can do a fantastic job for you.

  • How to add your own videos or photos?

    I want to know how to add Photos and Videos from my PC to my iPod...

    Well, there are a few ways. I'll tell ya two. First is iCloud. If you don't already, you can create an Apple ID and set up iCloud. To set up iCloud on PC, visit this site. Everything should sync after that.
    You can also use iTunes to sync up everything. First, put the photos that you wanna put on your iPod on to iPhoto. Put the videos you wanna put on iTunes. Like, drag the video into the "Videos" tab on iTunes. Then, go to the the iPod in "Devices" connected to iTunes. Once you select the phots and videos, press Apply/Sync.
    You're done.

  • How to add a 'Download' feature in image and video gallery?

    Hello,
    I have created an image gallery on one screen and placed few videos on another screen.
    Now, I want to add a download feature in photos & footages both.
    Does anyone know how so I do that?
    Prompt response will be highly appreciated.
    Thanks in advance.
    Jay

    Hi,
    Could you please provide additional information on what you mean by Download feature ? Where do you want to download these images and video from ?
    Olivier

  • How do i blend image and video on premier?

    Hello Everyone
    I'm trying to add a video onto an image on Premier. I want the image to be still and the video to play in the background. How do I make an image and video blend together in Premier?
    Any tips/effects to make this look more interesting? for my project I'm trying to add a disturbing footage from the news onto a landscape photograph.
    I'm using pro 5 on an Imac
    Thanks in advance

    Video on track one.  Image on track two.  Use the motion property to locate and size the image.

  • HT5148 i am using final cut pro x. i have imported some images and video in my timeline. when i play back my video it looks fuzzy. but, when i pause it, it looks clear. how do i get my video to play clear.

    i am using final cut pro x. i have imported some images and video in my timeline. when i play back my video it looks fuzzy. but, when i pause it, it looks clear again. how do i get my video to play clear and not fuzzy?

    Same reply.

  • How to include zoom option for images and video in adobe captivate5?

    I am developing an elearning software with captivate 5 which has images and video.
    I want to include an option to be able to zoom the images and video if clicked on the particular area.
    It should zoom any part of the image when clicked on it during run time and go back to original size when clicked again.
    How can I do this?

    1. I try with two images: The thumbnail y the Big Image Zoom image Detail.
    2. I Use Dinamic Images
    3. check this tip

  • How to add image at background of video

    I have one image and one video .
    i want to add image in video so that it looks like the part of the video.
    i don't want to add it at the backgroundView of MPmoviecontroller.
    I also don't want to add at the top most layer.

    Hello Clay,
    Click on the browse button at the bottom of your posting and
    ->browse to the image,
    ->select the image
    ->click Upload
    Now your image will be attached to your posting after you click submit.
    Hope this helps...
    The image below was added by doing a print screen, then pasted the image to the posting.

  • How to set restriction on shared folder to copy or move images and videos

    Hi,
    I am using windows server 2008 for file sharing, it's simple folder sharing and there is no additional roles added and not promoted as file server.
    Users have permissions to access folder and they can put data on shared folder but I want to restrict user that they can not copy any images and video on it.
    Need urgent help to stop copying images and videos on shared folder.

    If you need to restrict only certain types of files, then file screening is what you need. Windows Server 2012 R2 comes with a powershell module for FSRM, so you can script configuration of file screening.
    The code will look like the following (this is only an example):
    New-FsrmFileGroup -Name "Images and Videos" –IncludePattern @("*.jpg", "*.mpg", "*.avi", "*.tif", "*.mp4", "*.mov")
    $Notification = New-FsrmAction -Type Email -MailTo "[Admin Email];[File Owner]" -Subject “Warning: attempted to create a video or image file” -Body “You attempted to create a video or image file on a share that does not allow storage of this type of files.” -RunLimitInterval 120
    New-FsrmFileScreen -Path "C:\Shares\FileShare1" –IncludeGroup "Images and Videos" -Notification $Notification -Active
    Gleb.

  • How to use Image Capture to transfer images and video from Iphone

    I was wondering if I can use the program Image Capture to transfer image and video files from my Iphone? I set up my iphone to be synced with my laptop and tried opening up Image Capture and the program does not read any device attatched. However once I tried connecting my iphone to my imac and Image Capture opened up automatically. Would it be because my iphone is synced with my laptop that prevents it from reading in Image Capture? Any input would be appreciated!

    On your laptop, open iPhoto and check it's preferences > General, "Connecting camera opens ..." The available choices are iPhoto, Image Capture, or no application. Make sure it's set correctly.
    Here's a support document that may be useful: Copying personal photos and videos from iPhone, iPad, or iPod Touch to your computer, http://support.apple.com/kb/HT4083

  • Transferring images and videos from Nokia 5800 to ...

    Hello,
    I have been using Nokia PC Suite for years and now decided to jump onto OVI suite because the Nokia PC Suite was not able (mysteriously) to move picture and videos to my pc using USB cable. I gave up and started using OVI suite, which (how bizarre) can transfer images and videos to PC via cable connection with no problem.
    I was used to transfering and deleting all that stuff once copies were made to my PC... please correct me if I am wrong ... does OVI allow to do so automatically? I mean deleting the images and videos from the phone when transfer completed? Now my phone's memory and external card are full and I am not sure what I should do.
    Thank you in advance for the help.
    Cheers.

    JESZ wrote:
    You know I have being facing the same problems, first when I installed the first version, and is quit the same with the new version of ovi suite.  in a 14 G memory card with more than 10 g of free space, the ovi suite do not want to transfer my music.  This is a mass!!!  I'm very disappointed.
    First of all..the Problems are not SAME but totally different..
    BTW how are you transferring the Music ? and is it showing any error / message ?
    You may try this..(if doing some other way though..). Open OVI Suite and select Music.. Goto File-->Add File to collection and select the file  (song) you want to transfer..It will now get displayed in the OVI Suite..Now, connect your phone to PC.. and simply Drag-and-Drop the dislayed file onto the Phone Icon (Bottom - Left Window..) .. 
    --------------------------------------------------​--------------------------------------------------------​--------------------------------------------------​--If you find this helpful, pl. hit the White Star in Green Box...

  • Load image and video dynamically...

    Hello. Can I make a "Browse..." button in a "Settings" slide (at the beginning of the presentation), to point my presentation to a certain photo (one photo) and video (one video) files from a HDD? I want to use those files in one of next slides... Thank You!

    I was able to create a file with 2 buttons that will upload image and video separatly and it works fine.
    But what I want is there is a 3rd button for submitting the selected files, right now the files are uploaded as soon they are selected and the browse window is closed..
    How do I get to upload the selected files only when the SUBMIT button is clicked. Please help.
    var imageTypes:FileFilter = new FileFilter("Images (*.jpg, *.jpeg, *.gif, *.png)", "*.jpg; *.jpeg; *.gif; *.png");
    // Assign the document types filter
    var videoTypes:FileFilter = new FileFilter("Flash Movies (*.avi, *.flv, *.mov, *.swf)", "*.swf");
    // Add both filter types to an array
    var imgTypes:Array = new Array(imageTypes);
    var vdoTypes:Array = new Array(videoTypes);
    upload_image.addEventListener(MouseEvent.CLICK, browseImage);
    upload_vdo.addEventListener(MouseEvent.CLICK, browseVdo);
    var fileRefList:FileReferenceList = new FileReferenceList();
    function browseImage(event:MouseEvent):void {
        fileRefList.browse(imgTypes);
        fileRefList.addEventListener(Event.SELECT, selectHandler);
    function browseVdo(event:MouseEvent):void {
        fileRefList.browse(vdoTypes);
        fileRefList.addEventListener(Event.SELECT, selectHandler);
    function selectHandler(event:Event):void
        var request:URLRequest = new URLRequest("fileUploadScript.php");
        var file:FileReference;
        var files:FileReferenceList = FileReferenceList(event.target);
        var selectedFileArray:Array = files.fileList;
        for (var i:uint = 0; i < selectedFileArray.length; i++)
            file = FileReference(selectedFileArray[i]);
            file.addEventListener(Event.COMPLETE, completeHandler);
            try
                file.upload(request);
            catch (error:Error)
                trace("Unable to upload files.");
    function completeHandler(event:Event):void
        trace("uploaded");

  • Load external images and video in edge

    Hi.
    I am looking into edge instead of flash.
    My question is how do you load external images and videos from an external server?
    To clarify, I need to insert a link from where the images can load into the stage, so they don´t take up any of the final weight.
    Thanks in advance.
    Best,
    Stig.

    The above solution I provided works if you already have the images in your composition and than if you want form load images from another server rather than the relative location to your html file.
    Now if you want to load images dynamically into a rectagle containter you will have to code it.
    below is a sample for that
    Create a 'rectangle' with name 'Rectagle'.
    Add the snippet in the compositon ready or on other user actiosn based on your requirement
    var myImagetag = '<img src="http://wwwimages.adobe.com/include/style/default/SiteHeader/logo-2x.png">'
    sym.$("Rectangle").append(myImagetag);

Maybe you are looking for

  • Poor quality video in interactive pdfs

    I'm having problems embedding video content in a pdf whilst retaining its quality. I have a presentation document at A3 size in indesign, on which there is a video on the page at 400x224mm (or 1138x638px if I change the unit of measurement. We have b

  • File orientation on the designjet 800ps, using mac os x and photoshop

    Hi everyone We're having a problem with the orientation of the printout we're getting from a designjet 800PS...... The printer is working fine (except for some slight banding), but we are trying to work out the orientation first. Essentially when we

  • HT201250 My mac cannot access to the backup disc since I started using os 10.7.4

    Hi all, Since I started using os 10.7.4, i cannot use time capsule to back up. "The backup disk image "/Volumes/*************/*'s iMac.sparsebundle" could not be accessed (error -1)." WIll this issue be fixed if I upgrade to Mountain Lion

  • Error while loading period dimension in planning through DIM

    Hi, I am trying to load the metadata extracted from DRM into Period dimension in Hyperion Planning through Informatica using DIM. But I am getting the following error: Record [[YearTotal, Period, Total Year, Dynamic Calc, 0, null, null, null, null, U

  • Epson 3880 problems with Yosemite

    I always used Epson 3880 for printing large (Super A3 size) prints and I have not seen a problem until I upgraded to Yosemite. The printer is still printing OK, except the bottom 2cm are truncated, just white paper appears where there should be a par