User Profile

Collapse

Profile Sidebar

Collapse
comando2929
comando2929
Last Activity: Dec 6 '07, 08:47 PM
Joined: Nov 15 '07
Location: Riverside California
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I'm gonna asume that you understand for loops and can create the 100 numbers. To create a random number use Math.random() to get a number between 0 and 1. Then multiply by 20 because you need 20 different numbers. then add 1 to get results from 1 to 20.999 instead of 0-19.999. Then, asuming you want whole integer numbers, cast the resulting double to and int. There you go. Not too hard.


    for(int xx = 1; xx <= 100; xx++)...
    See more | Go to post

    Leave a comment:


  • comando2929
    replied to Connect to MySQL-database
    in Java
    I was tring something very similar a while back. I wanted a high score system for my Tetris but had a hell of a time tring a sign just a test applet. After a few days of struggling I ended up using a http connect function to a specific php page that would write the score into the database. I know, a little round about, but it works. Depending on how much activity you are panning on handling, something like that should work. An because it's not actualy...
    See more | Go to post

    Leave a comment:


  • In my experience, converting a java app to a complete stand alone is pretty simple. All you need to do is modify the code to start from the "public static void main" method and most likely open a frame of some kind. Once the code is complete zip all the necessary files into a "Jar" file using the jar function provided by the Java SDK. Then run it.

    An example of this can be found on my site on the Chat page. This...
    See more | Go to post

    Leave a comment:


  • Calling javascript that executes code within an applet

    I've been working on my site for a while now and think it's time that i find a way to fix a few things. The main thing that's bugging me right now it the fact that when any of my java applets are loaded on my site don't automatically gain focus? Why is that? would it be possible to write a javascript that calls the requestFocus() function in the applet immediately after the applet has loaded? Please help.
    See more | Go to post
No activity results to display
Show More
Working...