Search:

Type: Posts; User: Spidey1980

Search: Search took 0.14 seconds.

  1. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    I read somewhere that it it sets the far backgroud color, it's a windows bug not Java. I could see the black background briefly when resizing the window.

    Right now i'm working on drawing the stars...
  2. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    Color (Java 2 Platform SE v1.4.2)

    Colors can be either caps or lower, i.e BLACK or black (not BlAcK, ect.)

    Anyways I found that setBackground(Color.black) does not set the background color....
  3. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    here it is, this will compile, but output using AppletViewer nor via html is not as expected.
    note: my resolution is high, so that's why I have this to be 800x600.




    /*
    StarScape Applet...
  4. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    Thank you! adding (int) before Math.sqrt() fixed that one. Still having trouble with the key press checker.

    I got it to compile after commenting out the key checker. Guess CTRL ^C will have to do...
  5. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    Next issue. I've declared l, v, and w as integers. But the compiler says that they are doubles and need to be integers. This one is really confusing.

    And if anyone could tell me a better way to...
  6. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    The Errors:



    C:\JSource\Chapter02>javac StarScape.java
    StarScape.java:46: possible loss of precision
    found : double
    required: int
    l = Math.sqrt((v * v)+(w * w));
    ...
  7. Replies
    12
    Views
    1,829

    Re: Translating old program to java

    for ex: 20/15 <> 20/15 with no decimals, however 30/15 == 30/15 with no decimals.

    Your right, I meant double equals, but that did not fix the error. my .java now contains this fix.

    how can I...
  8. Replies
    12
    Views
    1,829

    Translating old program to java

    Ok so this is a personal project. I had made a QBasic program years ago and now i am translating it to be a java applet so I can show it off. I found a book on java programming and went through it...
Results 1 to 8 of 8