Search:

Type: Posts; User: Dr.Code

Page 1 of 2 1 2

Search: Search took 0.28 seconds.

  1. Replies
    2
    Views
    251

    Problem with accessing resources in JAR

    Hi, I'm making a test program for resource loading inside a jar and I'm having problems.

    I've read that you should use ClassLoader or alternatively getClass() to access a file inside a jar. Since...
  2. Replies
    2
    Views
    254

    Re: using class and method..

    The instructions say that all the data members (except height, weight, age and BMI) should be defined when the class is instantiated. A class is instantiated when the constructor is called. Therefor...
  3. Replies
    8
    Views
    440

    Re: Favourite letter!

    Thank you all for the answers :)!
  4. Replies
    8
    Views
    440

    Favourite letter!

    Hi everybody!

    Please don't be mad because of this article. Im writing this because I have a school project, well, its an investigation really. We have been assigned to investigate anything about...
  5. Replies
    3
    Views
    322

    Re: Image "flickers", need help!

    Hi!

    I have picked out some code snippets that could cause the problem. The first example is the drawing code of my main JPanel. This is were my buffering takes place.



    @Override
    public...
  6. Replies
    3
    Views
    322

    Image "flickers", need help!

    Hi!

    Im currently making a game with a rpg tile-based world. The problem is that the world gets "cracks" as if it flickers. I have never encountered this problem before and have no idea what it is....
  7. Re: How do I use a variable from main class in another class?

    Your problem is that the log variable is created inside the main(String[] args) method. You have to create this object outside the method but inside the class.



    public class Main {

    final...
  8. Replies
    8
    Views
    390

    Re: Help with collision!

    I am still pretty sure that the error is in the canBeAt() method in the first post!
  9. Replies
    8
    Views
    390

    Re: Help with collision!

    SOMEBODY PLEASE HIT ME IN THE HEAD! I have been wrong all along! the look-up Tile array is [y-axis][x-axis] not [x-axis][y-axis]! OMG! But that is easily fixed with a little tweaking on the...
  10. Replies
    8
    Views
    390

    Re: Help with collision!

    I just realized it do not! The x axis is moved forward 3 stepes(where i should get the value 3 i get 0) and the y axis is moved back 2 stepes (where I should get 0 i get 2) I will look further in the...
  11. Replies
    2
    Views
    443

    Re: Having java return method problem

    The problem is "street/n" as well as "town/n" it should be "street\n" and "town\n"! That's why you don't get any spacing!
  12. Replies
    8
    Views
    390

    Re: Help with collision!

    Im sorry if my message was unclear! I will edit it now!
  13. Replies
    4
    Views
    5,090

    Re: Orphan Thread - how to close

    Im sorry but I am not familiar enough with the java language to answer your questions, however I do now that there is a Thread.interrupted() method that returns true if the currently executing thread...
  14. Replies
    8
    Views
    390

    Help with collision!

    Hi, I'm making a simple game, but I have problems with my collision detection! My world is based on tiles with currently four different types: FLOOR, WALL, VOID and PIT.
    You shouldn't be able to...
  15. Replies
    12
    Views
    713

    Re: Please HELP! my code is wrong somewhere.

    You're error is as you said the myCoin.flip. You have to put myCoin.flip() and also change the flip method return type to double.



    for(int flips = 0; flips < 1000; flips++)
    {



    if...
  16. Replies
    5
    Views
    711

    [SOLVED] Re: My program skipping a for loop

    You were right again apparently I had put the setSize() method after i called the initAndStart() method. Thank you very much!
  17. Replies
    5
    Views
    711

    [SOLVED] Re: My program skipping a for loop

    You're right apparently the world.length variable = 0. But i have no idea why. world is a Block[][]
    defined in the constructor like this:



    public World(Dimension par0Dimension) {

    size =...
  18. Replies
    5
    Views
    711

    [SOLVED] My program skipping a for loop

    Hi, I'm making a game with random world generation. Everything is running smothly except when it comes down to drawing the blocks on screen. It has a for loop to loop through all the different blocks...
  19. Replies
    3
    Views
    611

    [SOLVED] Re: File not getting workspace

    Thank you! it worked!
  20. Replies
    3
    Views
    611

    [SOLVED] File not getting workspace

    Hi! (Sorry for the bad title. English is not my native language and I didn't know how to put it.) I have a problem with getting an image with ImageIO.read(File file). I have the following code to get...
  21. Re: Converting a Java App to an Applet(with no GUI)

    I'm not sure, but I think it should be <applet code="FirstApplet.class" width='300' height='300'>, not
    <applet code="FirstApplet" width='300' height='300'>.

    I'm not very good with Applets but...
  22. Replies
    6
    Views
    497

    [SOLVED] Re: Help with reading from file

    LOL! I'm so stupid...
    Thx man!
  23. Replies
    6
    Views
    497

    [SOLVED] Re: Help with reading from file

    Right, here's the code:



    package trust.src;

    import java.awt.List;
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
  24. Replies
    6
    Views
    776

    [SOLVED] Re: Help with Math.tan and Math.atan

    Wait, solved it, I should use Math.atan instead of tan and then convert the radians i get from that to degrees. And I get the correct output.

    Here's my final code:



    import java.util.Scanner;...
  25. Replies
    6
    Views
    776

    [SOLVED] Re: Help with Math.tan and Math.atan

    Well what I'm trying to do is to calculate an angle with only knowing the abutting catheter and the adjacent side.
    I do not know how to do that. I think it is something with arctan(Math.atan()), but...
Results 1 to 25 of 37
Page 1 of 2 1 2