IPAQ how to use hardware buttons in java

Hi,
Does anyone know how to be able to use the iPAQs harware buttons and joystick in Suns Personal Java?
I moved a Tetris applet i have written for PC's to the iPAQ and it works except for the arrow keys that i use to control it with.
Any help would be greatly appreciated!

I have the same problem.
Does anyone know how to use the buttons of the iPAQ for your java applications?
Thanks
Hector

Similar Messages

  • How to use hardware acceleration in Java 2D

    Hi,
    I searched in net and could not find anything clear on hardware acceleration using Java 2D/Swing.
    To use the hardware acceleration, do I need to specify
    -Dsun.java2d.opengl=true ? Is this must?
    Without specifying this, Java 2D calls wont use hardware acceleration?
    Kindly clarify. I could not able to find anything in net for this.
    I am having ATI Radeon AGP card and using Linux as OS. I have installed the ATI driver. Now I need to know how to interact with hardware using Java2D/Swing.
    Regards,
    fedorabee

    please post your questions once and only once

  • How to use sql query in java ?

    i don't know how to use sql query in java code.
    who can give me some advice?
    thanks

    http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

  • How to use C-Structure in java applets

    hi alls,
    I want to use a struct model (struct in C++) in java applets. i know class is used in java applications. but, how can i convert in java applets?
    class renk
    int r;
    int gr;
    int b;
    import java.awt.Graphics;
    import java.awt.Color;
    import java.awt.Event;
    import java.applet.Applet;
    public class benek extends Applet
    final int n=10;
    int x[] = new int[n];
    int y[] = new int[n];
    int count = 0;
    renk clr[] = new renk[n];
    public void init()
    setBackground(Color.black);
    public boolean mouseDown(Event yordam, int xyer, int yyer)
    if (count<n)
    System.out.println("...");
    ekle(xyer,yyer);
    else System.out.println("Kapasite Doldu...");
    return true;
    void ekle(int xyer, int yyer)
    int r1 = (int)Math.floor(Math.random()*256);
    int gr1 = (int)Math.floor(Math.random()*256);
    int b1 = (int)Math.floor(Math.random()*256);
    clr[count].r = r1;
    clr[count].gr = gr1;
    clr[count].b = b1;
    x[count]=xyer;
    y[count]=yyer;
    count++;
    repaint();
    public void paint(Graphics g)
    it gives error message... how can � use struct model in java applets???
    if you help me i will be greatfull....

    � use import but it doesn't work.
    i add: import renk; or import class renk;
    how will � add import I assumed based on your initial post that the renk and benek classes were in the same file. Apparently you're saying they are not. So for another thing, make your renk class "public class renk", and add the "public" keyword to the 3 members of that class. Then if your code still doesn't see the "renk" class, it would just be that you don't have the directory that contains the compiled "renk.class" in your classpath.

  • How to use " toFront() " method in java application and in which package or

    How to use " toFront() " method in java application and in which package or class having this toFront() method.if anybody know pl. send example.

    The API documentation has a link at the top of every page that says "Index". If you follow that and look for toFront(), you will find it exists in java.awt.Window and javax.swing.JInternalFrame.
    To use it in a Java application, create an object x of either of those two classes and write "x.toFront();".

  • How to use XML / XPath in JAVA (in 1.4) which third part component to use?

    How to use XML / XPath in JAVA (in 1.4)
    I'm absolutely novice in XML
    but I need to query XML using XPath
    As I understand XPath become avalible only in Java 1.5
    But I use 1.4 (project requirement)
    Which third part component could you recomend?

    Can anyone help me with this XPath query
    I get result [title: null]
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.w3c.dom.*;
    import org.jaxen.*;
    import org.jaxen.dom.*;
    import org.jaxen.saxpath.*;
    import java.util.*;
    public class TestX {
         public void ggg() {
              try {
                   File f = new File("journal.xml");
                   DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                   org.w3c.dom.Document doc = docBuilder.parse(f);
                   XPath xpath = new DOMXPath( "/journal/article/title" );
                   List result = (List) xpath.evaluate(doc);
                   System.out.println(result.get(0));
              } catch (Exception e) {
                       e.printStackTrace();
         public static void main(String[] args) {
              TestX tx = new TestX();
              tx.ggg();
    }journal.xml
    <journal>
        <article id="article.1">
            <title>Art1</title>
            <author>
               <first>Bob</first>
               <last>McWhirter</last>
            </author>
            <text>
            </text>
        </article>
        <article id="article.2">
            <title>Art2</title>
            <author>
               <first>James</first>
               <last>Strachan</last>
            </author>
            <text>
            </text>
        </article>
    </journal>

  • How to use openjpa  + kodo in Java SE?

    Hi.
    We are developing J2EE application on Weblogic Server 9. For a part of application we should create unit tests that will be run in Java SE. How to use openjpa + kodo in Java SE?

    Hi,
    Try the EclipseLink JPA JEE5/JEE6 provider - it has been shipping as part of WebLogic Server since 10.3.1.0.
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    The following page has several SE, application-managed and container-managed EE example tutorials with source.
    http://wiki.eclipse.org/EclipseLink/Examples/JPA/WebLogic_Web_Tutorial
    http://wiki.eclipse.org/EclipseLink/Examples/JPA
    The following forum will help you with any JPA specific issues.
    Forum: TopLink/JPA
    TopLink/JPA
    thank you
    /michael
    http://www.eclipselink.org

  • How to use Flash buttons/animation in a Swing/Applet?

    Hello,
    I want to use flash button as like as JButton that we use in Swing/ Applet. How can I do So?
    Please help me.
    Thanks-

    [http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html]
    Or maybe just...
    import java.awt.*;
    import java.net.*;
    import javax.swing.*;
    public class Blinky {
        public static void main(String[] args) {
            EventQueue.invokeLater(new Runnable(){
                public void run() {
                    URL url = null;
                    try {
                        url = new URL("http://www.gifanimations.com/GA/image/animations/bodyparts/eyes/eye-01.gif");
                    } catch (MalformedURLException e) {
                        throw new RuntimeException(e);
                    JFrame f = new JFrame("Blinky");
                    f.getContentPane().add(new JButton(new ImageIcon(url)));
                    f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
                    f.pack();
                    f.setLocationRelativeTo(null);
                    f.setVisible(true);
    }

  • How to use hardware acceleration in Swing?

    Hi,
    I searched in net and could not find anything clear on hardware acceleration using Swing.
    To use the hardware acceleration, do I need to specify
    -Dsun.java2d.opengl=true ? Is this must?
    Without specifying this, Java 2D calls wont use hardware acceleration?
    Kindly clarify. I could not able to find anything in net for this.
    I am having ATI Radeon AGP card and using Linux as OS. I have installed the ATI driver. Now I need to know how to interact with hardware using Swing.
    Regards,
    fedorabee

    Hi,
    I searched in net and could not find anything clear
    on hardware acceleration using Swing.
    To use the hardware acceleration, do I need to
    specify
    -Dsun.java2d.opengl=true ? Is this must?No. I've never seen that before. My assumption is that you'd do that if you wanted to make sure you're using OpenGL and not DirectX. Swing will make use of 2D hardware acceleration on it's own. Don't specify anything special.

  • How to use one button rollover symbol to create 100 graphically different buttons

    I do know how to create a button rollover symbol.
    I don't know how to make that button rollover symbol reuseable. I'd like to put 100 different images in 100 copies of the button. I'd rather not make new symbols for every button, since the rollover animation may change.
    Symbol "Accessibility" allows the title to be changed for copies of the symbol. Does similar functionality exist for bitmaps used in the symbol?
    Could the copied button bring in new graphics from the timeline in another symbol or a xml sheet?
    Any help would be greatly appreciated. I've been following tutorials, except none of them cover this situation.
    Thanks for your help!

    Created in EA version 3:
    I have 2 samples for you that are very similar.
    1- uses the symbol with no image and loads the image as a background-image for the div.
    https://app.box.com/s/co7uki3fm3b11a3o1xjw
    2- uses an image in the symbol and replaces this image with a new one in the img (not div)
    https://app.box.com/s/3ms92f5cv0mylspsi5uo
    Choose what you prefer.
    3. An example with more elements in the symbol directly on the stage instead of a container. use a container if you want to place the symbols in a specific rectangle div for example.
    https://app.box.com/s/y92bpo82kncxnn2w567y

  • How to use single button for different operations

    Hi
    I am using one button with image having 4 controls like left right up and down...
    How to use the single button for 4 different operations??
    Is there any way of defining hotspots on single button to do four different operations...
    Please have a look at the attached image, u can understand my problem better...
    Please let me know ASAP...
    Thanks and Regards
    Aruna.S.N.

    Here ya go:
    http://code.google.com/p/flexlib/wiki/ComponentList
    If this post answers your question or helps, please mark it as such.

  • How to use one button to drive another button click

    I'm trying to figure out a way to fix a bug in my application.  The simple fix would be to have a single button that drives a MouseCLICK event on another button everytime the PlayBar in my application reaches the end of the screen and returns to its origin.
    How would I achieve this?  I have made a lot of headway since I last posted a question in the ActionScript 3 forum, which was only yesterday evening.
    Thanks in advance,
    markerline

    The application is an audio application.  It is like a drum machine sort of.
    Currently there is a grid and whenever active cells get hitTest'ed by the PlayBar they become deactivated, the PlayBar returns to the origin, and when you relaunch the Play functionality the deactivated cells no longer play a sound.
    I have a button which reactivates the sounds.
    I also have a button which has a bug in it that loops the sounds. 
    To go around the looper button that has a bug in it I would like to use a Button "Z" which automatically clicks the "reactivate the sounds" button every time the PlayBar returns to the origin and the PlayBar will then continue to play and return to the origin in a looping fashion.  If the Button Z is in an active state this looping will continue.  To stop looping, click the Button Z until it is no longer in an active state and the PlayBar will then remain at the origin.

  • How to use host variable in Java?

    How do I use host variable in java? I am getting SQL code of -404 and description of SQL code is The UPDATE or INSERT statement specifies a String that is too long column-name SQLSTATE=22001. Below is my code:
    * i n s e r t M e s s a g e
    * insertMessage: This method will retrive detail message and other fields for
    * selected item from screen1.
    public final Collection insertMessage(String businessId,String messageNumber,String messageType,
    String messageTitle,String printStyle,String statusIndicator,
    String approverId,String lastUpdateId,String longMessage) {
    MessageTransport msi = new MessageTransport();
    PreparedStatement ps = null;
    Connection connection = null;
    MessageTransport msi1 = new MessageTransport();
    PreparedStatement ps1 = null;
    Connection connection1 = null;
    ArrayList list = new ArrayList();
    try {
    if (businessId != null) {
    businessId = businessId.trim();
    if (messageNumber != null) {
    messageNumber = messageNumber.trim();
    if (messageType != null) {
    messageType = messageType.trim();
    if (messageTitle != null) {
    messageTitle = messageTitle.trim();
    if (printStyle != null) {
    printStyle = printStyle.trim();
    if (statusIndicator != null) {
    statusIndicator = statusIndicator.trim();
    if (approverId != null) {
    approverId = approverId.trim();
    if (lastUpdateId != null) {
    lastUpdateId = lastUpdateId.trim();
    if (longMessage != null) {
    longMessage = longMessage.trim();
    int len = longMessage.length();
    if (len > 254) {
    int constant = 254;
    int k = len % constant; //k will hold value that has number of loops including initial insert.
    k = k - 1; //this is for total number of loop.
    int j = len / constant; //this will have remainder if any to insert rest of longmessage.
    System.out.println("Display remainder: " + k);
    System.out.println("Display divisible: " + j);
    System.out.println("Display Length of longMessage: " + len);
    StringBuffer sql = new StringBuffer();
    sql.append("INSERT INTO " + MESSAGE_TBL + " ( MT_BUS_ID,MT_MSG_NBR,MT_MSG_TYPE,MT_MSG_TITLE,MT_PRINT_STYLE,MT_APV_STATUS,MT_APV_ID,MT_APV_DT,MT_APV_TM,MT_LAST_UPDATE_ID,MT_LAST_UPDATE_DT,MT_LAST_UPDATE_TM,MT_MSG_TXT ) VALUES ");
    sql.append("(");
    sql.append("'");
    sql.append(businessId).append("'");
    sql.append(",").append(messageNumber);
    sql.append(",").append("'I'");
    sql.append(",").append("'").append(messageTitle).append("'");
    sql.append(",").append("'").append(printStyle).append("'");
    sql.append(",").append("'P'");
    sql.append(",").append("' '");
    sql.append(",").append("CURRENT DATE");
    sql.append(",").append("CURRENT TIME");
    sql.append(",").append("'").append(lastUpdateId).append("'");
    sql.append(",").append("CURRENT DATE");
    sql.append(",").append("CURRENT TIME");
    sql.append(",").append("'").append(longMessage).append("'");
    sql.append(")");
    System.out.println("Display SQL Statement: " + sql);
    connection = DriverManager.getConnection(DATABASE_URI, USER, PASS);
    ps = connection.prepareStatement(sql.toString());
    ps.executeUpdate();
    System.out.println("Refreshed Record: ");
    catch (SQLException sqle) {
    System.out.println("SQLException: "+ sqle + ". SQLSTATE=" + sqle.getSQLState()+" SQLCODE=" + sqle.getErrorCode());
    finally {
    if (ps != null) {
    try {
    ps.close();
    ps=null;
    catch (Exception e) {}
    if (ps1 != null) {
    try {
    ps1.close();
    ps1=null;
    catch (Exception e) {}
    if (connection != null) {
    try {
    connection.close();
    connection = null;
    catch (Exception e) {}
    if (connection1 != null) {
    try {
    connection1.close();
    connection1 = null;
    catch (Exception e) {}
    return list;
    if my longMessage is smaller like one line then everything works fine, but as soon as my longMessage if greater than 254 it starts giving me -404. How do I work around or Is there any way to use host variable in Java?
    All kind of help is appreciated. Any question then please email me at [email protected].
    Thank you.

    This is what you got to do to insert a larger value.
    //Assuming that message length is less than 254+ 254 characters.
    //If larger then run the update loop that many times.
    String longMessage = "Blah blah ... ";
    String firstPart = "";
    String secondPart = "";
    int messageLength = longMessage.length();
    if (messageLength > 254)
         try
              firstPart = longMessage.subString(0, 253);
              secondPart = longMessage.subString(254, message);
         catch (IndexOutOfBoundsException e)
    //In the first insert  set the first 254 characters
    ps.setString(1, firstPart);
    int result = ps.executeUpdate();
    if (result != 0)
           System.out.println("Insert  sucessful  ");
           if (messageLength > 254)
                //now update with the second part.
                static String UPDATE_SECOND_PART = UPDATE my.table SET LONG_COL = LONG_COL || ? WHERE KEY_COL = ?;
                ps2 = connection.getPreparedStatement(UPDATE_SECOND_PART);
                ps2.setString(1, secondPart);
                ps2.setString(2, businessId);  //assuming that businessId is the primary key.
                int result2 = ps2.executeUpdate();
                if (result2 != 0)
                      System.out.println("Update  sucessful  ");
                else
                     System.out.println("Update failed ");
    else
           System.out.println("Insert failed ");
    }Hope this helps.

  • How to use a button in a required field

    Hi,
    this is my scenario:
    1) In a Form I have two Blocks
    2) In the first, I use a text Item for the customer code, with the required property set to true and with a trigger WHEN-VALIDATE-ITEM
    3) In the second block, I use a button that call the 'show_lov' function in order to display the list of the customers.
    If the focus is out of the first block, I can use the button without problems.
    If the focus is on the customer code Item and I try to use the serch button, the alert message "Field required" is displayed and I don't be able to use the function in the button.
    Exist a method in order to use my button when the focus is in the required customer item?
    If Yes, how can perform this ?
    I hope...
    Best Regards
    Gaetano

    When you set Required = Yes, you're telling Forms not to allow the user to navigate away from the item until they enter a required value. That's the way Forms is designed.
    If you don't like that behavior (and I'm one that doesn't), I rarely use Required = Yes. Instead, I write the code to check for a required value in the PRE-COMMIT trigger. If the item doesn't have a value, I set focus to the item, and then issue a RAISE Form_Trigger_Failure.
    I'm sure there are other ways to do this, but that is just one technique.

  • How to Use Exec function in Java Code

    How to Use Exec method
    I want to Execute command
    net Start "some service"
    using exec method of runtime class
    or i use some other way if suggest

    Assuming you have read http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String) already, I can only suggest to be more specific in what your problems are. If you are after just some example code, then download ftp://ftp.ebi.ac.uk/pub/software/textmining/monq/monq.tar.gz and have a look at the source code of monq.stuff.Exec. It does all those things which are necessary to keep track of a Process after it was created with exec.
    Harald.
    BioMed Information Extraction: http://www.ebi.ac.uk/Rebholz-srv/whatizit

Maybe you are looking for

  • Trying to open PowerView on SharePoint 2013 throws an error

    Hello, I am having some serious issues with a vanilla install of SharePoint 2013 in a dev environment. SQL and SharePoint are in different servers. I installed PowerPivot in the SQL Server, then I proceeded to run the PowerPivot configurator in the S

  • HOW TO CREATE EXTERNAL NUMBER RANGE IN OM

    HI ALL HOW TO CREATE EXTERNAL NUMBER RANGE IN OM PLEASE GIVE ME SPOON FEEDING IT IS VERY URGENT FOR ME PLEASE PLEASE AND PLEASE REGARDS

  • Itunes 11.1 crashes when started in 32 bit mode

    I'm running itunes 11.1 (126) on a new macbook air. it's running fine in default 64-bit mode but when I try to start it in 32-bit (because of some podcasts that require quicktime) itunes immediately crashes after starting. has anyone experienced the

  • Problem in using iBook

    I cannot access to my iBook! When I touch it I just see a white screen....I cannot use my PDFs .... What's the problem in your idea?? What should I do?

  • "ABAP Basics" Book - arithmetic expression error in the sample code

    Hi all, I have just started learning ABAP on mini SAP system (NW7.01) by following "ABAP Basics" book. This question might be a FAQ, but I have spent a few days searching a right answer without success. I appreciate if you could help me on this. On t