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

Similar Messages

  • 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 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

  • Voice Recognition security System... Can it be done with Java??

    i'm working in graduation project and i'm developing a system that use voice Recognition security System [the user voice as ID] so i'm asking if it can be done with java and if any tutorials about it ??
    null

    Make the PDF file available as a normal URL on the server.
    Redirect the client browser to the URL.
    This will work IF Acrobat is installed, AND is installed as a plugin to the browser, but that's a reasonable assumption if you're presenting PDF files in the first place.
    I wouldn't personally be inclined to try to do this with an applet (JSPs + Servlets would be the way to go in my opinion), but it may be possible to redirect the page from an applet...?

  • Convert byte to bits, can it be done in Java?

    I'm working on a compression program for class, and I'm wondering how I can convert a byte to the bits it is represented by. Does anybody know if you can do this in Java?

    I don't think that's what I'm looking for. What I
    want is the 1s and 0s representation of the character
    A, B, and so on.Characters in Java are represented by the 16 bit Unicode. Each character has been assigned a 16 bit number according to the code charts here,
    http://www.unicode.org/
    For example a latin 'A' is represented by the number 65,
    char c = 'A'; // bit pattern 1000001
    int i = c;       // same bit pattern 1000001
    System.out.println(c + " = " + i);The above prints the 'A' both as a character and as a number. In both cases it's the same bit pattern 1000001. To extract the bit pattern you can loop 16 times and utilize the following bitwise operations,
       if ((i&1) == 1) // Rightmost bit in i is a 1 (set)
       i = i >> 1; The bit pattern in i is shifted one bit position to the right

  • Is this can only be done through Java mapping?

    Hi Friends,
    my scenario is jdbc to idoc.
    Am able to create multiple idocs basing upon delivery_date. But here my requirement is -- there are qty, slnumber, vaxinum are having different values. And all these should also be generated in the same Idoc.
    INPUT
    delivery_date         ------      qty   -------- slnumber        -------- vaxinum
    19/02/2006            ------  10      ----------   457854        --------- 10001
    19/02/2006            ------  20      ----------   457855        --------- 10001
    19/02/2006            ------  30      ----------   457854        --------- 10001
    19/02/2004            ------  20      ----------   457854        --------- 10001
    19/02/2004            ------  20      ----------   457854        --------- 10001
    19/02/2005            ------  20      ----------   457854        --------- 10001
    OUTPUT
    Three Idoc's to be created -- am able to create it basing upon delivery_date.
    But for 19/02/2006 this Idoc number there are different qty and different slnumber. So, I want to be created multiple segments in the same IDoc.
    Thanks.
    S.
    Edited by: Swarna on Sep 21, 2011 1:29 PM

    Hi Swarna,
           Please try with the below logic.
    DeliveryDate-->removecontext->sort->splitbyvaluechange->collapsecontext---IDOC
    concatsortUDFSegment
    coacat:
    Input1-OutputofFormatByExample1sort
    Input2-OutputofFormatByExample2sort
    FormatByExample1:
    input1:outputofsortbykey2
    input2:DeliverNo-removecontext-sort--splitbyvaluechange
    FormatByExample2:
    input1:outputofsortbykey1
    input2:DeliverNo-removecontext-sort--splitbyvaluechange
    sortbykey1:
    input1:DeliveryNo--removeContext
    input2:SlNumber--removecontext
    sortbykey2:
    input1:DeliveryNo--removeContext
    input2:qty--removecontext
    *ExecutionType of UDF is all values of context*
    public void UDF(String[] var1, ResultList result, Container container) throws StreamTransformationException{
              ArrayList aList = new ArrayList();
         for(int i=0;i<var1.length;i++){
              if(aList.contains(var1<i>))
                   continue;
              else{
                   aList.add(var1<i>);
                   result.addValue(var1<i>);
    Thanks
    Priyanka

  • Attempting to add aditional functionality to my program. Can it be done?

    I play online poker. I've written a program that keeps track of poker hands I've played, as well as the players I've played against. After every hand, the poker client writes the hand to a text file. My program reads these text files, extracts certain information regarding the hands and stores it in a database.
    I want to add the functionality to the program that would enable it to be aware of things that are happening during the course of a hand; i.e, what cards are displayed on the board, what action each player has taken (raise, bet, check, etc.), how much each player bets, etc. These things can easily be attained AFTER the hand is over by reading through the text file that is saved, but I want the program to have access to this information DURING the hand, so I can have it preform various calculations and various other tasks.
    Now, I'm not sure how to go about doing this, nor am I sure if this can even be done in java. I expect what I would need to do is have the program intercept the data which represents various things - actions taken by players, bet sizes, displayed cards, etc - that is transfered between the poker client and server . Or, perhaps, there is a simpler, more obvious solution to this.
    So, is there any way to do the above with the proposed solution? If not, is there any other way that my program can work with the poker client itself in order to obtain the desired information without dealing with the interaction between the poker client and server?

    Who does this and how? Is the progam dumping this information? Are you manually entering it? Or did you actually write a program that is doing this? And how does it work?What happens is after a hand is completed, the poker client writes the hand to a text file. My program reads through this text file and extracts certain information. So, the text file looks something like this:
    Seat 4: player 1 ($156.50 in chips)
    Seat 6: player 2 ($17.50 in chips)
    player 1: posts small blind $1
    player 2: posts big blind $2
    *** HOLE CARDS ***
    Dealt to player 1 [9s Js]
    player 1: raises $2 to $4
    player 2: raises $2 to $6
    player 1: calls $2
    *** FLOP *** [3d As Jh]
    player 2: bets $2
    player 1: calls $2
    *** TURN *** [3d As Jh] [3h]
    player 2: bets $4
    player 1: raises $4 to $8
    player 2: calls $4
    *** RIVER *** [3d As Jh 3h] [6s]
    player 2: bets $4
    player 1: calls $4
    *** SHOW DOWN ***
    player 2: shows [Ah Kd] (two pair, Aces and Threes)
    player 1: mucks hand
    player 2 collected $39 from pot
    *** SUMMARY ***
    Total pot $41 | Rake $2
    Board [3d As Jh 3h 6s]
    Seat 3: player 2(big blind) showed [Ah Kd] and won ($39) with two pair, Aces and Threes
    Seat 4: player 1 mucked [9s Js]
    So my program just parses this text and extracts certain information, then saves it to a database I created using JDBC. I can then access this info through the GUI I created.
    This question is problematic because I don't see how if you actually wrote a program that actually does something that you couldn't make it working during the game and not just after. What I suspect is happening is that either the client is dumping this information for you or that you are manually capturing it.
    So can you describe how you are getting the information now exactly?The problem is that the text file is written to AFTER the hand takes place, not during. I'm looking for a way to access what is taking place in the hand, during the hand and not after.
    Is that helfpul at all?

  • I have just downloaded ML.  I can get my email via iCloud, but I can't get it on MAIL 6.0.  I have done the JAVA thing--seems to be OK.  MAIL 6.0 on my desktop won't sync with Mobile Me and won't download emails.  Any suggestions?

    I have just downloaded ML.  I can get my email via iCloud, but I can't get it on MAIL 6.0.  I have done the JAVA thing--seems to be OK.  MAIL 6.0 on my desktop won't sync with Mobile Me and won't download emails.  Any suggestions?

    Just did something--am not sure what, probably in the "iCloud"--but seems to be working at last!

  • I can't download AdobeReader 9.3. Their instruction don't jav.

    I can't download AdobeReader 9.3. Their instructions don't jav.
    == URL of affected sites ==
    http://

    Hello Gwen.
    Yes, you will need to contact Adobe for support, but you may just need to read this:
    https://support.mozilla.com/en-US/kb/Using+the+Adobe+Reader+plugin+with+Firefox

  • 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.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can it be done?

    I have heard about people compile java apps into native machine code, but how can it be done? I have heard that the javac compiler, and netbeans is also written in Java, but as I can see they are Win32 EXEs, as well as native for other platforms, is that true? I know that Java should be cross-platform and write once run everywhere, well I also want to be able to compile it into native machine code as an alternative. I have trying to send a little Java program to some my friends today, which involves the NIO Api that only avaiable in 1.4,. Only two of the top geeks with broadband have 1.4, most of dialups have 1.3 and have Class Not Find Exception, and 2 computer illeterate where I know they have Java installed, but there are no ways to find out what version of Java they are using. The 14 meg JRE is a plain for most 56ks, they are also looking at multiple web sites as well and 14 meg is ALOT.

    All major applicaions will need a native installer. JAR files are fine for deploying small apps to people who have the latest JRE installed, but if you want to gaurantee your program will run on all machines, you have to make a native installer which includes the JRE in its directory structure. The netbeans ide .exe is probably just a small c++ program which invokes the javaw command. There are several free programs about which will give you this. I always use this:
    http://www.rolemaker.dk/nonRoleMaker/javalauncher/marner_java_launcher.htm
    There are instructions on the site for bundling the JRE(note java isn't actually installed, you just copy the c:\program files\java\j2re1.4.2.xxx and access the javaw command via a relative path). Your app will then work on any machine and most users will no even know that it's written in java, but your app install or zip file will be a minimum of 14MB. As far as I know there isn't a really good way to reduce the size. There are commercial programs out there which convert java to native code:
    www.excelsior-usa.com/jet.html
    However, if you read the FAQ on the site, it states that you will probably still need to bundle the full JRE with your app as it may require various DLLs found within it. If you want your program to work, you users will just have to put up with a big download whether the JRE is bundled with your app or they install it seperately.

  • Port 443 on UNIX not run as root? Can it be done?

    This is probably more a UNIX question then a java question but I would like to know if it is possible to run a java server on port 443 in a non-privileged account sandbox. I don�t like the idea of running my server as root but would like use port 443 for my HTTPS server.
    Can this be done? Any ideas?

    Unix root privileges are required to bind to a port less than 1024, so your program must be setuid root or be started from the root account. However it can drop those priveleges immediately it has the port (i.e. the ServerSocket, by calling setuid() to another account and setgid() to another group. You need a bit of JNI to organize this from Java, sorry.

  • Help--How can I open only one java program at one time?

    How can I open only one java program(same program) in Windows at one time?

    In Java 1.5, you can use the JVM's own monitoring APIs to examine what other JVMs are running on the system, and what applications they're running.
    It's general and powerful, but complex. The socket/file/whatever approach is cleaner, and probably more suited to your usage.
    Don't bother trying to use the Windows task manager for this sort of thing. You have to write messy native code, and it isn't reliable after all that anyway.

  • I've never done any java, so i really need help

    Hello all.
    i've never done any java, but i've been trying to make a series of phrases scroll every few seconds.. i'd like the text to have links so that while the text goes up, you can click on the links..
    could anyone help ? pls
    PS/ there an example of what i'd like to be done
    over http://java.sun.com/index.html at the botom left of the page..
    Thanks all for the help !!! =)
    ps: i've already posted this question but got no sure answer... hope someones got a bit of time to help

    im not looking for duke dolars or how they are called but many guys here are, so if you want a fast answere or even want one you should give some dolars. thats my experiance.
    but about youre question. if you only want to make somethink like this try looking for source code of news ticker. there are a lot of things like this. try www.javaboutique.com or www.sourceforge.com

  • How can i create messenger with java tv API on STB

    deal all.
    how can i create messenger with java tv API on STB.
    how can Xlets communicate each other?
    how?
    i am interested in xlet communications with java tv.
    is it impossible or not?
    help all..

    You can create a messenger-style application using JavaTV fairly easily. JavaTV supports standard java.net, and so any IP-based connection is pretty easy to do. The hard part of the application will be text input, but people have been using cellphone keypads to send SMS messages for long enough that they're familiar with doing this. This doesn't work well for long messages, where you really need a decent keyboard, but for short SMS-type messages it's acceptable.
    The biggest problem that you need to work around is the return channel. Many receivers only have a dial-up connection, ties up the phone line and potentially costs people money if they don't get free local calls. Always-on return channels (e.g. ADSL or cable modem) are still pretty uncommon, so it's something that you nee to think about. Of course, if you do have an always-on connection then this problem just goes away.
    This is really one of those cases that's technically do-able, but the infrastructure may not be there to give users a good experience.
    Steve.

Maybe you are looking for

  • Date changes in Aperture not syncing with IOS 7 iPhone iPad

    Hi, there are a certain number of photos in my Aperture library which are showing the correct date or have had the date and time adjusted but when synced to iPhone or iPad the dates are completely wrong. It seems to be fairly random, any clues? Thank

  • How to re-write this self join update using a CTE

    I would like to improve my performance on this update statement and would like to try re-writing using a CTE: UPDATE "usr_sessions" "a" SET "is_ended_at_trustable" = 't'       WHERE (         EXISTS (           SELECT 1           FROM "usr_sessions"

  • Computer at work, wont recognize Iphone.

    Hello, I have 1.9Ghz Power PC G5 at work with the latest Itunes and all available updates as of 9/16/09. (OS = 10.4.11). My iphone 3gs works fine otherwise but when I try to plug it in via USB/Synch cable at work, the computer just doesn't recognize.

  • Photoshop online help - help

    When clicking on the 'Photoshop online help' menu link, i'm met with: Any clues anyone, hope to hear from you, i'm confused why it's started to do this every time. brgds Alex

  • Photoshop CS, Dreamweaver 8, Adobe Reader all suddenly failing to launch.

    The icon bounces once, then the little triangle disappears. This problem started around August 24th. This is on an eMac (PPC). No new software of any kind has been installed on this mac, and in fact the only changes to the system were automatic updat