Search:

Type: Posts; User: Norm

Page 1 of 20 1 2 3 4

Search: Search took 1.19 seconds.

  1. Re: code is giving me a different result then expected..

    The test is being done outside of the loop. It needs to be inside the loop.
  2. Re: Code works in IE11 but not chrome or Firefox

    @Greg The page has an applet referenced with an object tag.
  3. Replies
    11
    Views
    77

    Re: How to create a sports tables java applet

    What security setting level is set in the Java icon in the Control Panel? Have you tried the lowest setting?

    There also is a place in the Java Icon's Security page to list Exception Sites? Have...
  4. Re: Error: Could not find or load main class Program, I need help

    Please copy the text and paste it here, not an image. Images are hard to see and text can not be copied from an image when writing a response.
  5. Re: Error: Could not find or load main class Program, I need help

    Are there any compiler errors? Copy the full text of the error messages and paste it here. If there are no compiler errors, Try running the code in a command prompt. If there are errors, copy the...
  6. Re: Code works in IE11 but not chrome or Firefox

    Does the applet work with the <applet tag?


    See this: http://docs.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/using_tags.html
  7. Replies
    2
    Views
    75

    Re: main class problem

    Can you post line 24 and the specifics about what kind of error happened there?
  8. Re: complete noob, pretty sure I'm just missing one argument

    The println() method expects that all the parameters that are passed to it (inside the ()s) are Strings or can be converted to a String.
    Change the setTime method so that it returns a String that...
  9. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    Glad you got it working.
  10. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    Is the key listener method called? Add a println() to see.
  11. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    The code works for me.
  12. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    New images should NOT be loaded in the paintComponent() method. Load the image outside of that method and then call repaint() to have the system call the paintComponent() method where the newly...
  13. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    Change a and call repaint().
  14. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    Set a to the first image in the constructor so its value is not null when paintComponent() is called.
  15. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    You don't control when the system calls the paint methods. The repaint() method requests that a call be made some time (usually soon).
    What do you want to see on the screen BEFORE the user presses...
  16. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    The test for a being null would be in the paintComponent() method.

    You can't change the order of when the methods are executed. The user's key pressed can't be recognized before the screen is...
  17. Replies
    11
    Views
    145

    Re: Using FileOutputStream to save array of bytes

    The Writer classes like FileWriter and OutputStreamWriter might work.
  18. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    The paintComponent() method is called BEFORE the user gets a chance to press any keys. Add code there to test if a is null before using the value in a.
  19. Thread: java commands

    by Norm
    Replies
    5
    Views
    85

    Re: java commands

    Of course. The packages are listed In the upper left corner of the page for the API doc at:
    Java Platform SE 7
  20. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    There is a null value when line 48 is executed. Look at line 48, find the null value and then backtrack in the code to see where the null value came from.
  21. Replies
    11
    Views
    145

    Re: Using FileOutputStream to save array of bytes

    That is the String returned by the byte array's toString() method.
    To write the contents of the array use: fos.write(array);

    You should use a different class and method to write text.

    For...
  22. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    When you have errors, you should copy the full text of the message and paste it here.
  23. Replies
    28
    Views
    167

    [SOLVED] Re: How to change image when a key is pressed?

    @jocdrew21 Please edit the code in your post and give it proper formatting. Nested statements should be indented.

    @jerinjose61 Please edit your post and wrap your code with code tags:


    YOUR...
  24. Thread: java commands

    by Norm
    Replies
    5
    Views
    85

    Re: java commands

    One way would be to open the src.zip file that comes with the JDK and look in the folder for the package you are interested in.
  25. Replies
    8
    Views
    133

    [SOLVED] Re: Grading System Program

    Can you copy the full contents of the console from when you execute the program and paste it here to show what the program does when it is executed?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4