Can this be done in java? i think so  but how?

Hello,
I just wanted to know how to add icons to a JDesktopPane like the appear on your desktop, that's whatever OS you use, I've looked everywhere and cant find the answer, posted this question here several times still no answer. Is it that nobody knows how to do this or it's it cant be done in java?????? ANYONE!!!

Hi there
Now this is not perfect
You cannot press the duke
to move around him you have to miss him to do that
So it needs improvment
but its a start
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class MainPanel extends JDesktopPane implements MouseMotionListener,MouseListener
     private JLabel test;
     public MainPanel()
          test = new JLabel(new ImageIcon("duke.gif"));
          test.addMouseListener(this);
          this.addMouseMotionListener(this);
          test.setBounds(50,50,50,100);          
          this.add(test,new Integer (10));          
     public void mouseDragged(MouseEvent e)
          Point p = e.getPoint();
          test.setLocation(p);
     public void mouseMoved(MouseEvent e){}
     public void mouseClicked(MouseEvent e)
          if(e.getClickCount()==2)
               System.out.println("You double clicked me");
     public void mousePressed(MouseEvent e){}
     public void mouseEntered(MouseEvent e){}
     public void mouseReleased(MouseEvent e){}
     public void mouseExited(MouseEvent e){}
}/Markus
PS every thing can be done In java

Similar Messages

  • I have been given a 28 page Pdf and have been asked to optimize the item to reduce the file size. Can this be done in Photoshop Elements? if so how?

    I am using a Mac and just bought Photoshop Elements 13. I have been given a 28 page Pdf and have been asked to optimize the item to reduce the file size. Can this be done in Photoshop Elements? if so how?

    No the pages will open as separate documents in Expert Mode. You really need Acrobat or possibly you could copy and paste the contents into MS word. Then re-save as PDF.

  • Can this be done with css rollovers?

    Hi,
       I'm using Dreamweaver CS4 on a Windows PC. I understand the basics of css rollovers where you change the background image position up or down but the text used will still end up being a common font that will suit every pc. What I'd like to do is use an uncommon font in my navigation bar. I made an image in photoshop that had two versions of a word like home for example one on top of the other like you would for a css rollover but once I created a link I had the link color border around the image, so it didn't work. Here is a link to a website that is similar to what I'm trying to do http://www.inksmithtattoo.com/. Look at the navigation, can this be done using css rollovers? If not how do you think it was done? Is there a way to use uncommon fonts in a navigation bar? I even did some research on using Dreamweavers hotspot function but found that there were issues in using it for navigation. I'm getting pretty familar with Dreamweaver but I'm not that good at coding so if anyone does have any ideas please include some keywords that I can google and read more about what your trying to say, links to the info would be even better but I realize that if your as busy as I am you can't take that kind of time.
    Any ideas or help will be greatly appreciated.
    Thank you to all,  dluthier

    That site is using images only. It is not a text based link:
    here is the css they are using:
    #navAbout a {
    -moz-background-clip:border;
    -moz-background-inline-policy:continuous;
    -moz-background-origin:padding;
    background:transparent url(../_img/navAbout-Home.gif) no-repeat scroll 0 0;
    left:473px;
    top:318px;
    As you can see it is an image only. See the attachment with this post. Also since it is a background image it won't show up if you right click on the so seemed text
    Please install firebug or webdeveloper plugin if on Firefox and you will be able to inspect the elements and know what exactly they are.
    Hope it helps
    Regards,
    Vinay

  • It can be done in C++, can it be done in Java?

    Hi
    In C++, the following code will change a to 2.
    int a = 1;
    int *b = &a;
        *b = 2;How can this be done in Java?
    My reason is that I implemented SortedSet so that it creates and maintains a binary tree (Assignment pre-requisite).
    If the subSet method is called, it returns a portion of the Tree!
    How can i get it to return this portion so that any changes which are made to this subSet are automatically reflected in the original Tree? (Just trying to be a geek and get extra brownie points)
    Thanx
    Tecknick

    public class MyInt {
    public int sss;
    public MyInt myInt = null; // only reference
    public MyInt( ){
    } // default constructor
    } // class MyInt ends here..
    // here now..
    public MyInt a = new MyInt( );
    a.myInt = a; // very Clever
    a.sss = 1; // Your ---------------> int a = 1;
    public MyInt b = a.myInt; // your
    ------------------> *b = &a;
    b.sss = 2; // Your -----------------> *b = 2;
    What is the point of the member field myInt here? The example code gives the effect of just using MyInt myInt = this; and not setting the value in the client code. Why would you ever need to explicitely give an object a reference to itself? You would get exactly the same results (and clearer code) if it wasn't present:
    public class MyInt {
      public int value;
      public MyInt(int value) {
        this.value = value;
      public static void main(String[] argv) {
        MyInt a = new MyInt(1);
        a.value = 1;
        MyInt b = a;
        b.value = 2; //Since a == b, a.value is now equal to 2 as well.
    }Notice that this is now the same idea as was posted by rabbit3000 earlier - it just doesn't use accessor methods (up to you if you decide you want to) - all it is, is a mutable version ot java.lang.Integer. I couldn't see a good reason for a default constructor, so I took that out too.

  • Can it be done in java?

    hi,
    i am doing a project in which the following needs to be done:
    i have a set of map files with me. now in my project, i need to create a frame with an icon. when i click on the icon, i should get a window that should allow me to choose any one of the map files that i already have.
    can this be done in java or is it easier to implement it in java script? i will appreciate if any of u can suggest me the exact procedure to follow preferably using java.

    Yes it can be done in java. If you want to do it as applcation then there is no problem. But if you want to write an applet then the applet should be signed.
    the way is, create a button with a image. handle the buttons action event and in that display filedialog box to select the file.
    Thanks
    Regards
    vivek

  • I want to have 2 seperate libraries with content in different locations, can this be done?

    Hi there, I have 2 uses for itunes, one is for my mobile DJ business and for this I store all of my music on a 2TB external firewire 800 HDD I use Traktor Pro to mix, but find itunes very good for creating playlists.  I would however like to be able to store seperate content on my internal drive in a different library for personal use as a great deal of the stuff in my DJ collection I personally have no time for, and do not want the inconvenience of needing to connect my external HDD to be able to listen to my own collection.  I have a SSD installed and have tried depressing the CMD button during startup of the application although no option for creating a new library presents its self, it may be that the start up is too quick for me to be able out this.  Any ideas guys? Many thanks.

    Trying2loveMac wrote:
    Can this be done? If so, how?
    there may be other (better) ways out there but all i can think of is this:
    1) make one iTunes library the main one and "consolidate" files that aren't in it, but in the other computer's libraries, to it.
    you can use home sharing for this but home sharing won't copy ratings, playcounts, and original "date added". a 3rd party tool such as PowerTunes would be very useful if those details are important to you.
    2) once the "main" library is created, copy the entire iTunes folder (not just the iTunes music or media folder) to the media server, launch iTunes while holding the option(⌥) key, click on choose library when prompted, and select the iTunes folder you copied to the new location.
    3) repeat with the other Macs.
    with a setup such as this, be aware that only one iTunes at a time can access the library. if your intention is to enable multiple machines to access the library simultaneously, you will probably have look into a NAS with a built-in iTunes server.

  • I need to read data from a text file and display it in a datagrid.how can this be done..please help

    hey ppl
    i have a datagrid in my form.i need to read input(fields..sort of a database) from a text file and display its contents in the datagrid.
    how can this  be done.. and also after every few seconds reading event should be re executed.. and that the contents of the datagrid will keep changing as per the changes in the file...
    please help as this is urgent and important.. if possible please provide me with an example code as i am completely new to flex... 
    thanks.....  

    It's not possible to read from a file without using classes from the core API*. You'll have to get clarification from your instructor as to which classes are and are not allowed.
    [http://java.sun.com/docs/books/tutorial/essential/io/]
    *Unless you write a bunch of JNI code to replicate what the java.io classes are doing.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • I have numbers on mac mini and need to email as an attachment  one sheet instead of the 30. Can this be done

    Can anyone help please. I have just downloads the numbers app. I have a very large document of which i need to send a separate sheet each week as an attachment via email. Can this be done?. Sadly, I am used to Neo and that was rather easy to do.   I could not find the answer for excell either!  Surely, saving each sheet separately is not the only answer. 

    File > Print
    set the print range "From "  = 1, "To" = 1 in the print dialog, then
    click the "PDF" button the bottom left and select "Mail PDF"
    If you must send a Numbers document, then I think I would copy the germane content into a new document and save as the current month (or week), then attach that document.

  • Can this be done?

    I am formatting a form in Adobe Acrobat Pro 9. One of my fields is for a credit card number. I have set up a "Special" Arbitrary Mask to the format and limit of numbers that can be entered.
    What I would like to do it Mask some of the numbers as they are entered. I entered the Arbitrary Mask as 9999-****-**99-9999. The problem is that this set up is causing the entry to skip the ***. My concern then is that the person entering the data will not realize this skip and not provide the correct ending numbers.
    What I would like to happen is that the person entering the data will type the complete 16 digit number and the system will MASK the numbers I designate with an **.
    Can this be done?
    Thanks in advance for any assistance.
    Kathy

    Hopefully I'm not breaking any posting rules by saying "I think I love you!"
    My functional desires always exceed my knowledge level so I want what I don't know how to create. Your script totally worked and I would never have figured that out on my own. I want to learn what you do very badly.
    We are masking the numbers for security reasons. We know the numbers being masked but we don't want to store the full number in our records. 
    Thank you so much for your help, What kind of experience do you have with Access 2007 or 2010?
    Kathy

  • Can this be done? Emailing a completed form without emailing.

    When using a standard html form, a user can fill in the required fields, press post, and abracadabra, the results of the form are emailed to the specified account and the user is redirected to a page that says your form has been submitted.
    Can this be done using a .pdf? The email button is simply retarded. Why do users have to go through the hassle of having their email client opened just to submit the form they just completed? There probably isn't any other way, but would be nice if there was.
    Is it possible to create a submit button that will automatically email the completed .pdf form to a pre-specified email address and then redirect the user to a "thank you" page? I don't want to annoy my customers by forcing them to email me the form. I just want it sent when they click "submit."
    Is this even possible? If so, is it relatively easy?
    Any help is greatly appreciated!

    >Can this be done using a .pdf?
    Sure. The principle is exactly the same: you submit data to a script
    which runs on a web server. You are limited only by what the
    programmer has made the script do. Don't be under any impression that
    it is "magic": if you have a web form which submits and then you get
    an e-mail it's because there is a script on a web server that a web
    programmer wrote to make it happen.
    > The email button is simply retarded.
    I prefer to think of it as a handy tool for testing, but nothing
    anyone would use for the real solution.
    >Why do users have to go through the hassle of having their email client ...
    They don't. Did you know that you can "submit" an HTML form to e-mail?
    But nobody does, because it just isn't a good way of working. Everyone
    expects an HTML form to submit to a web script, but for some reason
    hopes they can use direct e-mail of PDF forms.
    Aandi Inston

  • Demo & Video - Can this be done?

    My client would like to have a captivate demo of their
    software on the right side of the screen, while on the left there
    is video of a manager explaining the demo.
    It would look like this:
    link
    Can this be done with just Captivate? From what I can tell
    your recording has to be the full size of your project. If not,
    anyone know what tools could be used to do this? I assume Flash,
    but would imagine the difficulty would be getting the demo and the
    video to be in sync.
    Any suggestions/thoughts are very appreciated.
    Edit: I think I should have put this post in General. Anyone
    know how to have it moved? I don't want to create multiple posts of
    the same topic.
    Thanks!
    Choksi

    Welcome to our community, Choksi
    I'm pretty sure you can do this with Captivate, some
    imagination and another little Adobe product called Visual
    Communicator.
    Click here
    for the Visual Communicator site)
    Basically, you would record the demonstration at the smaller
    size. Then you would create a larger Captivate presentation that
    would hold the whole thing. You would then have the basic
    demonstration occurring in the left side of the screen as your
    image shows. Now for the fun part. You would use Visual
    Communicator to record many smaller video segments that describe
    what is occurring over on the left side of the screen. Once
    recorded, you would produce them as .FLV files and insert them onto
    the Captivate slides as needed.
    I suppose you may be able to also work the other way around.
    Create the Captivate projects and insert them into Visual
    Communicator. Not sure if it supports that quite yet, but may be
    interesting.
    Hopefully that helps... Rick

  • 1 repository serving 2 OBIEE servers - can this be done?

    Hi Gurus.
    I have a question that I though might be better answered in this forum.
    Is it possible for us to configure 1 repository and have 2 OBIEE / Web Logic servers running from it?
    We are thinking of having one OBIEE server for external and the other for internal layers.
    Can this be done? With each running off / out of the same repository?
    I did find this http://www.rittmanmead.com/2010/07/obiee-11gr1-scaleout-clustering-and-high-availability/
    Any comments?
    Thanks in advance,
    OBIEE Oracle Business Intelligence 11.1.1.3:
    Linux x86 (64-bit):
    The Data ware house Database will be a 11g database
    Edited by: 869150 on 12-Sep-2011 05:52

    whoops - just read this Clustering
    i will close this post now.

  • Can this be done only with Session Beans ?

    Hi all,
    suppose I have an airline web selling ticket application.
    This is the web flow:
    -The user chooses destinations & date
    -The user chooses seats
    -The user confirms to buy
    If it's NOT required to persist itineraries until the user confirms to buy,
    can this be done ONLY with Session Beans ?
    I think that there aren't cuncurrency problems because even if two persons will book the same flight, they'll get different sequence Id (if the sequence is generated by the DataBase).
    I think the worst scenario is if two person book the last seat at the same time, one will get an error.......
    What do you say to it ?
    Thanks
    Francesco

    If it's NOT required to persist itineraries until the
    user confirms to buy,
    can this be done ONLY with Session Beans ?Yes. Even if persistence is required, you can use only session beans with some persistence mechanism.

  • I want to Connect my Mac Mini as a Slave to a Mac pro Server while at the same time using the Mac mini's thunderbolt ports peripherals ( ie monitor, Sound Card, Hard drives) Creating a poor man's new mac Pro. Can this be Done?

    I want to Connect my Mac Mini as a Slave to a Mac pro Server while at the same time using the Mac mini's thunderbolt ports peripherals ( ie monitor, Sound Card, Hard drives) Creating a poor man's new mac Pro. Can this be Done?

    Well, I really would love the new unreleased mac pro however , I'm not sure of the expected cost , Everyone speculates from $3,000 to $8,000, in which I may have to wait a while to purchase.
    To the point .... I want fully functional thunderbolt ports to be on the current mac pro's .... wonder if anyone had workarounds yet?...  or could I chain the the current mac pro to a mac mini to make that happen?

  • I AM TRYING TO FORWARD TX MESSAGES TO MY COMPUTER, CAN THIS BE DONE?

    I AM TRYING TO FORWARD TX MESSAGES TO MY COMPUTER, CAN THIS BE DONE?

    You should be able to forward them to your e-mail, or you could use a text backup app from Google Play that will backup your texts and e-mail them to you (SMS Backup and Restore is an example).

Maybe you are looking for

  • How to extract an element value from a String of HTML

    I have a web service that returns a fragment of HTML that contains a number in a table. The return parameter type is a string. I need to get this number and use it in a BPEL while loop, as the condition for the loop (while the number > 0). I have tri

  • Search help is populating the input field with wrong data

    Hi Guys, I have created a ZCITY table for which has below 2 field ZZCITY (Code ) (5 Char) u2013 Key field ZZNAME (City Name ) (40 Character) I have added a custom field ZZCITY & ZZNAME in CI_CATSDB. Funtional guy has configured to make ZZNAME as  VIS

  • Solved: message "You are not connected to the Internet" after idle sleep

    Summary: What worked for me was to turn off IPv4 and IPv6 on my unused interface. The problem was that after my computer had been in sleep mode, Safari would say: "You are not connected to the Internet." or "softwareupdate -l" would say: "This comput

  • Self registration error in OIM-OID-OAM 11g

    Hi, We are using OIM,OID,OAM 11G,in clustering mode.We are facing a problem on self registration process. For every alternate self registration request,system is throwing an error.After the self register user request has got approveod,I have checked

  • Ecatt: ME21N (document overview)

    Hello ecatt experts, I have one question concerning the recording of ME21N with ecatt (sapgui). When creating a PO with ME21N I want to link it to a purchase requisition. To choose a puchase requisistion I use the document overview. The problem which