How to import the image by using java application

1.how to import the image by using java APPLICATION and display it on the textarea that you have been created.
2.how to store the image into the file.
3. what class should i used?
4. how to create an object to keep track the image in java application.
* important : not java applet.
plzzzzzzz.
regards fenny

follow the link:
http://java.sun.com/docs/books/tutorial/2d/images/index.html

Similar Messages

  • How to get the context data using java script in interactive forms

    Hi All,
    How to get the context data using java script in interactive forms by adobe,  am using web dynpro java
    thanks.

    Hi venkat,
    Please Refer this link.
      Populating one Drop-Down list from the selection of another Drop-down list
    Thanks,
    Raju.

  • How to create the exe files for java application

    How to create the exe file for java application?
    got any software to do that?
    Thanks

    In terms of converting java applications into exe files, there are 3 schools of thought:
    1) Instead of converting it to an exe, convert it to a jar file. Jar files are more portable than exe files because they can be double-clicked on any operating system. The caveat is that a Java interpreter must be installed on the target computer for the double-clicking to work.
    http://developer.java.sun.com/developer/Books/javaprogramming/JAR/
    2) Create an exe launcher that, when double-clicked, attempts to find a Java interpreter on the local computer and launches the Java application. The exe file is still double-clickable but whether your java application runs depends on whether a Java interpretor is installed on the target computer.
    http://www.sureshotsoftware.com/exej/
    http://www.objects.com.au/products/jstart/index.jsp
    http://www.duckware.com/products/javatools.html
    http://www.ucware.com/jexec/
    http://www.rolemaker.dk/nonRoleMaker/javalauncher/
    http://www.jelude.cjb.net/
    http://thor.prohosting.com/~dfolly/java/index.html
    3) Create an exe launcher that bundles a Java interpretor. Same as above but when the exe file is double-clicked, it searches for a Java interpreter and if one is not found, it installs one on the target computer. The caveat is that the exe file would have an overhead of 10 MB in size for the interpreter.
    http://www.excelsior-usa.com/jet.html (evaluation version available)
    4) Convert the Java application into a native exe file. The caveat is that if you use Swing for your GUI, it won't be converted. Also this option is still somewhat experimental.
    Can't think of any free options right now.

  • How to assign the Thems into Webdynpro Java Application

    HI All,
                   I Downloaded the plugin for them editor and i add those plugins and i created the Them. Please any one can help me how to add that Them into Webdynpro java application.

    Hi ep bhargav,
    You can check this link.....
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/ccb6bcf4-0401-0010-e3bc-ec0ef03e13d1
    Re: webdynpro theme editor
    Thanks.
    Venkat.

  • How to view the image by using mousedrag event?

    How can i move the full image by using mousedrag event(not using scrollBar and the frame should not reziable).
    e.g
    click the mouse in image and drag right side or towards down,the image should move to till the end in width or height
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    public class LoadAndShow extends JPanel implements MouseMotionListener{
        BufferedImage image;
        Dimension size = new Dimension();
        public LoadAndShow(BufferedImage image) {
            this.image = image;
            size.setSize(image.getWidth(), image.getHeight());
         * Drawing an image can allow for more
         * flexibility in processing/editing.
        protected void paintComponent(Graphics g) {
            // Center image in this component.
            int x = (getWidth() - size.width)/2;
            int y = (getHeight() - size.height)/2;
            g.drawImage(image, x, y, this);
        public Dimension getPreferredSize() { return size; }
        public static void main(String[] args) throws IOException {
             //set the image path
            String path = "Images/dinette.jpg";
            BufferedImage image = ImageIO.read(new File(path));
            LoadAndShow test = new LoadAndShow(image);
            JFrame f = new JFrame();
            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            f.setResizable(false);
            f.add(test);
            f.setSize(400,400);
            f.setLocation(200,200);
            f.setVisible(true);
            //showIcon(image);
         * Easy way to show an image: load it into a JLabel
         * and add the label to a container in your gui.
        private static void showIcon(BufferedImage image) {
            ImageIcon icon = new ImageIcon(image);
         public void mouseDragged(MouseEvent arg0)
              // TODO drag the image
         public void mouseMoved(MouseEvent arg0)
    }

    Following is the updated code for image move on mouse move.
    import java.awt.*;
    import java.awt.event.MouseEvent;
    import java.awt.event.MouseMotionListener;
    import java.awt.image.BufferedImage;
    import java.io.*;
    import javax.imageio.ImageIO;
    import javax.swing.*;
    import java.awt.event.MouseListener; public class LoadAndShow extends JPanel implements MouseMotionListener,MouseListener{
    BufferedImage image;
    Dimension size = new Dimension();
    Point pt;//Maintain the Current Pressed Values of Mouse
    Rectangle rect;//Maintain the moving position of Mouse     public LoadAndShow(BufferedImage image)     {
    this.image = image;
    size.setSize(image.getWidth(), image.getHeight());
    this.addMouseListener(this);
    this.addMouseMotionListener(this);
    * Drawing an image can allow for more
    * flexibility in processing/editing.
    protected void paintComponent(Graphics g) {
    // Center image in this component.
    int x = (getWidth() - size.width)/2;
    int y = (getHeight() - size.height)/2;
    g.drawImage(image, x, y, this);
    }     public Dimension getPreferredSize() { return size; }     public static void main(String[] args) throws IOException {
    //set the image path
    String path = "C:\\Documents and Settings\\All Users\\Documents\\My Pictures\\Sample Pictures\\Winter.jpg";
    BufferedImage image = ImageIO.read(new File(path));
    LoadAndShow test = new LoadAndShow(image);
    JFrame f = new JFrame();
    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    f.setResizable(false);
    f.add(test);
    f.setSize(400,400);
    f.setLocation(200,200);
    f.setVisible(true);
    //showIcon(image);
    * Easy way to show an image: load it into a JLabel
    * and add the label to a container in your gui.
    private static void showIcon(BufferedImage image) {
    ImageIcon icon = new ImageIcon(image);
    }     public void mouseClicked(MouseEvent e) {
    }     public void mousePressed(MouseEvent e) {
    pt = e.getPoint();
    rect = this.getBounds();
    }     public void mouseReleased(MouseEvent e) {
    }     public void mouseEntered(MouseEvent e) {
    }     public void mouseExited(MouseEvent e) {
    }     public void mouseDragged(MouseEvent e) {
    Point p=e.getPoint();
    moveImageOnMouseMove(p);
    }     public void mouseMoved(MouseEvent e) {
    * This Function is used for calculate the Dragging point of Mouse and set the image on particular points
    * @param p Point hold the dragging point of Mouse
    private void moveImageOnMouseMove(Point p)
    int xDelta = p.x - pt.x;
    int yDelta = p.y - pt.y;
    rect.x = rect.x + xDelta;
    rect.y = rect.y + yDelta;
    this.setLocation(rect.x, rect.y);
    this.repaint();
    }}   If you have any query related with the code please let me know.
    Manish L
    MS Technology
    www.ms-technology.com
    Edited by: mannymst on Sep 18, 2008 5:53 AM
    Edited by: mannymst on Sep 18, 2008 6:05 AM

  • How to upload the file without using java components?

    Hello,
    I need to upload the file using JSP, but I don't want to use java componets(such as
    jspsmart).
    Who can tell me how to realize it? This issue is very important to me,
    thanks all in advance!

    make you're own servlet using the multipartrequest from o'reilly.
    easy and simple, no jspsmart, only 1 jar file and some descent programming.
    I use it like that...

  • How to pack the images i use in swing into jars

    I know how to pack my programs into jars, but how can i also pack in my images used by my program, they dont work when outside the jar.. Thanks

    i am not if my answer satisfies your requirement.
    Even we also used images in my swing application and made it executable jar.
    what we have done is we have done is as below
    icon =     new ImageIcon(new URL("http://xyz.com/ui/v8/images/icon-information-blue.gif"));
    so in this case ,no need of images to be packed along with jar ,you can access the images which is there on net..
    thanks.

  • How to know the system configuration using Java.

    Hello Everyone,
    I wanna know the system configuration (Hard Disk size,Ram capacity,Processor speed) .Can we know it using Java API? Or else is there any API which makes my life easier?
    Can someone let me know,please?
    All ur answers r most welcome.
    Thanks

    --> provides you with some basic info on os user and os but my best bet is to find a windows system file that maintains this information and then read the data from it
    import com.sun.servicetag.SystemEnvironment;
    SystemEnvironment se = SystemEnvironment.getSystemEnvironment();
            System.out.println(se.getCpuManufacturer());
            System.out.println(se.getHostId());
            System.out.println(se.getHostname());
            System.out.println(se.getOsArchitecture());
            System.out.println(se.getOsName());
            System.out.println(se.getOsVersion());
            System.out.println(se.getSerialNumber());
            System.out.println(se.getSystemModel());
            System.out.println(se.getSystemManufacturer());Edited by: emmanuel.putti on Nov 11, 2008 6:43 AM

  • How to read the Image Data using HTTp Request response

    i want to read image data from server please send me any code or answers.
    and also i want to exit application using button control for iphone simulator.
    thanks in advance.

    You would do a URLRequest and download the image. You could save it to disk and then load it or directly create a new image with the binary data.

  • Import the CRM ICSS5.0 java application into track

    Hello CRM People,
    we are try to import the CRM ICSS5.0 application into the development track, But in the transport studio we are not able to import the actual physical icss5.0 component.
    We dont know where we went wrong, Please can any body let us know how to proceed with import the icss5.0 into a track in CMS,
    Thank you in advcance,
    CRM AM

    follow the link:
    http://java.sun.com/docs/books/tutorial/2d/images/index.html

  • How to run a jar file using Java application.

    Hi all,
    I know that jar file can run using the following command, using the command prompt.
    java -jar jar-fileBut I don't know how to run that command through a Java code. Hope it's clear to you.
    So can you please explain how can I do it.
    Thanks,
    itsjava

    rayon.m wrote:
    The solution given by ropp appears to have nothing to do with what you asked about.Ok sir, I got the point.
    I've try a test as follows. But it doesn't give any output. Even not an exception.
            try {
                String[] temp = new String[]{"java", " -jar", " MainApp.jar"};
                Runtime rt = Runtime.getRuntime();
                Process proc = rt.exec(temp);
                int exitVal = proc.waitFor();
                System.out.println("ExitValue: " + exitVal);
                System.out.println("Temp_Values");
            catch(InterruptedException ex) {
                System.out.println(ex.getMessage());
            catch (IOException ex) {
                System.out.println(ex.getMessage());
            }I've debug and see, but the exitValue is even not exist at run time. Can you tell me where I'm going wrong.

  • Please Its very urgent How to connect the thumb device using java media fra

    I was new to JMF please help me
    i wnat the code for connecting to the signatuure pad or thumb device present iam doing project in biometrics please if any body knows
    the code farward it tome bye
    Advance Thanks

    The SecuGen FDx SDK for Java 1.0 Beta1 is now available. It is posted at http://sgdn.secugen.com. This is a JNI wrapper for the SecuGen FDx SDK v3.0. Sample source code including JSGD, A SWING version of the SecuGen Diagnostic utility. Currently only MS-Windows is supported.
    Best regards.
    =Dan=
    Dan Riley - SecuGen

  • How to comment the xml tags using java

    Iam using a xml file i want to comment some of the tags in that file

    And your quesion is? Did you parse it into a Document and do you want to write a changed version into another file?

  • How to check the database existence using java.

    Hi All,
    I need to know if a database exists or not using DB2 sql statements. Is there any sql to find that.
    Thanks in advance

    try to connect to the database. if it is possible, the database exists - if not - well there may be a number of reasons, but if your database URL is correct, your network is ok and your database engine is running, the database is not existent.

  • How to fetch the BCC address using java mail

    Hi,
    I want to extract the mail address given in the Bcc address field of an email which I fetch it from the IMAP store !!
    I will be very much thankful if this problem is solved !!
    Thanks!!

    You can read the Bcc addresses just like the To and Cc addresses. But.... Note that Bcc addresses
    won't be present in any message you receive; if you could see the Bcc addresses it wouldn't be a
    blind carbon copy. If you create a message with Bcc addresses and save that message in your
    "Sent Items" folder, you'll be able to read the Bcc addresses in that message.

Maybe you are looking for