Search:

Type: Posts; User: KevinWorkman

Page 1 of 20 1 2 3 4

Search: Search took 0.59 seconds.

  1. Replies
    2
    Views
    157

    Re: Java 2d game development

    Cornix pretty much nailed it, but let me offer my two cents.

    If you're just starting out (even if you're not), I highly recommend checking out Processing. Processing is built on top of Java, so...
  2. Re: Can you use images as buttons in Processing

    You might consider using a grid instead- maybe a 2D array? That way you don't need to worry about positioning as much. That's what I would do if I were you, anyway.
  3. Re: Can you use images as buttons in Processing

    Well, again, you'll have to break it down into smaller pieces: can you detect when all of the pieces are in the correct place? Can you write a separate sketch that shows a congratulations message?...
  4. Re: Can you use images as buttons in Processing

    Well, in addition to just calling setup() again, you need to stop any existing music and reset any variables.

    One approach is to have a separate stop() and reset() function. Call those instead of...
  5. Re: Can you use images as buttons in Processing

    Okay, cool. You've got a program that detects when the mouse is inside the rectangle- that's exactly what you'd do with an image.

    There are a couple different ways to detect a mouse click. You can...
  6. Re: Can you use images as buttons in Processing

    Processing isn't exactly Java. It's a great way to start, but things like images and buttons are handled very differently in Processing versus Java.

    But your instincts are correct: you can detect...
  7. Re: Checking parantheses using stack data structure

    I'm not really sure what your question is. What does this code do? What isn't working about it? Can you fix your formatting and post an MCVE?

    What are you trying to do here:

    str.indexOf(i)=='('...
  8. Re: Can you use images as buttons in Processing

    Are you asking about Processing or Java?

    Either way, the answer is yes. What have you tried?
  9. Replies
    3
    Views
    133

    Re: Calculator Layout

    For starters: make sure you add your components to your JFrame **before** the JFrame is visible. Otherwise you have to revalidate your JFrame to redo the layout.
  10. Replies
    1
    Views
    308

    Re: Parsing string from pattern

    What you're talking about is called capture groups. Google is your friend, but feel free to post some code if you get stuck.
  11. Replies
    3
    Views
    133

    Re: Calculator Layout

    You've got two JFrames here: the one you're extending, and the one you're creating and showing.

    You add your menu bar to the JFrame you're extending, but then you show a different JFrame.

    I'd...
  12. Replies
    1
    Views
    137

    Re: Need help with a Comp Sci Lab

    What exactly are you confused about? What's the absolute smallest, simplest thing you know you need to do next?
  13. Replies
    20
    Views
    212

    Re: Inheritance & Polymorphism

    http://www.java-forums.org/new-java/94610-inheritance-polymorphism.html
  14. Re: When I am deleting data from a file, the temp file won't rename back to original file

    The code is not doing what you expect it to do. That is the exact reason for debugging. In fact, you're just asking us to do your debugging for you- which we really can't do, since we don't have...
  15. Re: When I am deleting data from a file, the temp file won't rename back to original file

    Do you get an Exception of any kind? Try debugging your code by either stepping through with a debugger, or at least adding print statements, to figure out when the program's execution differs from...
  16. Replies
    1
    Views
    78

    Re: Transparent Panel Drawing

    You've asked a bunch of questions- take them one at a time. Can you post an MCVE- preferably without any of the Netbeans GUI builder code, since it's a nightmare.
  17. Replies
    2
    Views
    231

    Re: exam question

    I'm not sure what your question is- it's hard to go off of "stuck". What exactly are you confused about?
  18. Replies
    1
    Views
    67

    Re: ActionListener don't work

    Why would it? The KeyPressed() function should be the keyPressed() function, but you don't have a KeyListener anywhere so it doesn't really matter.

    Please post an MCVE, and we'll go from there.
  19. Thread: Sudoku

    by KevinWorkman
    Replies
    4
    Views
    162

    Re: Sudoku

    http://www.java-forums.org/new-java/94628-sudoku.html
  20. Re: How to display a decimal place with 100 digits?

    Well, you're getting into the whole problem with floating-point numbers. Computers don't have infinite precision, so there's a limit to how many decimal places you'll get when dealing with them.
    ...
  21. Re: How to display a decimal place with 100 digits?

    When I run that code, it prints out:

    01.414213562373095100000000000000000000000000000000000000000000
  22. Re: How to display a decimal place with 100 digits?

    Storing and displaying are two separate issues. It sounds like you have the storing part down. For display, check out the NumberFormat and DecimalFormat classes in the API.
  23. Replies
    6
    Views
    465

    Re: ArrayOutOfBounds Exception

    Okay, so now it's time to debug your program.

    If you think it's on line 43, try adding a print statement right before that to make sure. Work backwards (by adding more print statements) to figure...
  24. Replies
    6
    Views
    465

    Re: ArrayOutOfBounds Exception

    What line is that error on? What index are you trying to access? How many indexes are in that array?
  25. Replies
    3
    Views
    121

    Re: Website Security Questions

    Well, there's a danger in that with most sites. That's why it's such a big deal if your email gets hacked, and why you shouldn't use the same password for your email and everything else.

    However,...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4