Page 2 of 2 FirstFirst 12
Results 21 to 38 of 38
  1. #21
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    "list of mouse listeners"
    See the Component class. It has the methods to get listeners

  2. #22
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    it takes too much time
    What takes too much time?

  3. #23
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    Getting the image and saving it takes about .9-1.4 seconds.

  4. #24
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Why save it? What about using pixel grabber to extract the pixels.
    Is the saved image a good copy of what the applet is displaying?

    Could you post the URL to the jar file and the class so I could try it?

  5. #25
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    YoctoBot.jar
    The applet is displaying an OpenGL based game. And thanks a lot for helping me! :)

  6. #26
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    What is the applet's class name?
    The name I put in this method call: gfa.setMainClass("AppletTest2");

  7. #27
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    it is called "loader"

  8. #28
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    What url do I put in for this:
    String base = "http://world" + App.world + ".runescape.com";

  9. #29
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    App.world is a whole number between 1-50. 25 should do.

  10. #30
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    What jar name do I use here:
    gfa.setJar("TestJar.jar");

  11. #31
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    "loader.jar"

  12. #32
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    No luck yet. Here's what I get:
    Java Code:
    url=http://world25.runescape.com/loader.jar, className=loader
    Exception in thread "main" java.lang.NoClassDefFoundError: a (wrong name: A)
    	at java.lang.ClassLoader.defineClass1(Native Method)
    	at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
    	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
    	at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
    	at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
    	at java.lang.Class.getDeclaredConstructors0(Native Method)
    	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
    	at java.lang.Class.getConstructor0(Class.java:2699)
    	at java.lang.Class.newInstance0(Class.java:326)
    	at java.lang.Class.newInstance(Class.java:308)
    	at GuiForApplet.initApplet(GuiForApplet.java:162)
    	at GuiForApplet.init(GuiForApplet.java:62)
    	at GuiForApplet.main(GuiForApplet.java:194)

  13. #33
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    That is strange. In the main method, did you set the var's like this?:
    Java Code:
    gui.setJar("loader.jar");
    gui.setMainClass("loader");
    If not, just try running it directly from the jar that i posted.

  14. #34
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Yes, that's how I did the sets.

    I'll try it from your jar.

    Thanks.

  15. #35
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    Do you think the applet prevents mouseclicks?

  16. #36
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    I don't know. Did getMouseListeners return anything?

    When I ran the code in your jar I got a completely gray screen in the Frame.
    I could click on it and get your JOptionPane message.

  17. #37
    crikey is offline Senior Member
    Join Date
    Jul 2010
    Posts
    125
    Rep Power
    0

    Default

    Very strange...It shouldn't display gray, but a game.

  18. #38
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,783
    Blog Entries
    7
    Rep Power
    21

    Default

    Quote Originally Posted by crikey View Post
    Very strange...It shouldn't display gray, but a game.
    You're mixing up screen coordinates and coordinates relative to the component that fired the MouseEvent.

    kind regards,

    Jos

Page 2 of 2 FirstFirst 12

Similar Threads

  1. Animation with Animated GIF
    By JavaBean in forum Java 2D
    Replies: 3
    Last Post: 06-04-2011, 05:26 PM
  2. Extracting jpg from animated gifs
    By Maz in forum Java 2D
    Replies: 3
    Last Post: 05-05-2011, 01:29 PM
  3. Help with Applet implementing mouselistener
    By dsym@comcast.net in forum Java Applets
    Replies: 3
    Last Post: 05-14-2009, 01:57 AM
  4. Playing an Animated GIF
    By c0m4ndo45 in forum Java 2D
    Replies: 3
    Last Post: 04-24-2009, 11:47 AM
  5. Animated JPanels + Moving Pages
    By PetalumaBoy in forum New To Java
    Replies: 0
    Last Post: 02-16-2009, 12:09 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •