Search:

Type: Posts; User: KevinWorkman

Page 1 of 20 1 2 3 4

Search: Search took 0.45 seconds.

  1. Re: How to get Which Button Clicked in through getActionCommand when Button have no Label!

    Either compare it to the value returned from ActionEvent.getSource(), or only add the ActionListener to that particular JButton so you always know which JButton it was.

    If you can't get one of...
  2. Re: Just got started with Java - looking for feedback!

    Google is your best friend for these types of questions. Googling and reading tutorials and API documentation is a huge part of programming.

    This is the first result for googling "java importing"...
  3. Re: Just got started with Java - looking for feedback!

    This is the first result for googling "java scanner tutorial": Scanning (The Java™ Tutorials > Essential Classes > Basic I/O)
  4. Re: Just got started with Java - looking for feedback!

    That seems like a goofy way to get input. Why don't you use a Scanner instead?

    Putting this inside a loop (such as a do-while loop) is reasonable. Just make sure you give the user a way to exit...
  5. Re: How to get Which Button Clicked in through getActionCommand when Button have no Label!

    Either compare it to the value returned from ActionEvent.getSource(), or only add the ActionListener to that particular JButton so you always know which JButton it was.

    If you can't get one of...
  6. Re: Completely new to Java, don't understand my first Assignment

    Please don't put words into my mouth. I did not suggest that he "doesn't have what it takes to learn to program", and in fact I would not say that, about anybody.

    What I did say is that he might...
  7. Replies
    10
    Views
    178

    Re: Generating per person URL

    I'm not sure if anybody mentioned this approach, but another way is to send each email address a unique link.

    When somebody visits that unique link, then you know that they got it from the email...
  8. Replies
    1
    Views
    30

    Re: mark answered Q

    Edit -> Go Advanced -> Prefix -> Solved

    I'm moving this thread to the forum lobby as this isn't a question about Java.
  9. Re: Buying a new laptop, software engineer student.

    This is entirely up to personal preference. There is no "best operating system" for programming, especially programming in Java.

    You should get whatever you're comfortable using.
  10. Replies
    3
    Views
    100

    Re: Java vs Groovy

    http://www.java-forums.org/new-java/92621-java-vs-groovy.html
  11. Re: Shuffling an Array is putting the same integer in more than one place

    What happened when you tried?

    What you need to do is figure out *what you're trying to do* first. How would you do this in real life, with a real deck of cards?

    Pretend you have a friend who...
  12. Re: Shuffling an Array is putting the same integer in more than one place

    Think about what this for loop is doing:


    for (int i=0; i<3; i++)
    {
    int randomPosition = r.nextInt(3);
    RandomDeck[randomPosition] = Deck[i];
    }
  13. Replies
    10
    Views
    178

    Re: Generating per person URL

    This sounds like a horrible idea. It sounds like you're trying to do some security-through-obscurity type of restriction, which never works.

    What is your actual end goal that you think this is a...
  14. Thread: Tiled map

    by KevinWorkman
    Replies
    4
    Views
    70

    Re: Tiled map

    What exactly do you mean when you say "it doesn't work"? It's pretty impossible to help you with the information you've provided.
  15. Thread: Tiled map

    by KevinWorkman
    Replies
    4
    Views
    70

    Re: Tiled map

    You're going to have to play with a couple different things. You haven't posted an MCVE, so it's really hard to debug this for you. What if you use the bottom of the sprite (y+height) as the z order?
  16. Replies
    2
    Views
    69

    Re: creating a tree in java

    That really isn't how this works. Please provide an MCVE showing exactly what you've tried and where you're stuck, and we'll go from there.
  17. Replies
    4
    Views
    116

    Re: Help! For my high school son stuck

    Like I said, part of programming is learning how to look up these kinds of resources yourself. I'm really not trying to be rude, but I guarantee that the point of the assignment is to get the...
  18. Replies
    4
    Views
    116

    Re: Help! For my high school son stuck

    I don't mean to be rude, but part of learning how to program is learning how to do research on your own- you might be doing him a disservice by posting for him.

    That being said, I assume he's...
  19. Replies
    2
    Views
    78

    Re: Reversed Input

    What happened when you stepped through this with a debugger, or at least added some print statements, to figure out where the execution of the program differs from what you'd expect?
  20. Re: Can someone tell me how to convert this C++ code to java? (just 50 lines)

    I'm not really sure what you're asking for here. Step 1 is to translate this code to English (or whatever natural language you speak natively). What does this code do? Step 2 is to translate that...
  21. Replies
    2
    Views
    91

    Re: Change Maker

    You tell us. What does this code do?

    What happened when you stepped through it with a debugger, or at least added some print statements, to figure out when the program's execution differs from...
  22. Re: Can someone tell me how to convert this C++ code to java? (just 50 lines)

    If you have no idea what this piece of code does, why do you want to translate it into Java?
  23. Replies
    6
    Views
    173

    Re: Java2D Array Help :(

    What have you tried? What do you have so far? Where exactly are you stuck? Where is your MCVE?
  24. Re: Can someone tell me how to convert this C++ code to java? (just 50 lines)

    I've moved this to the Other Programming Languages forum.

    Generally, you don't translate a piece of code line-by-line. Instead, you translate the *intent* of the code as a whole. You ask yourself,...
  25. Replies
    3
    Views
    220

    Re: Ranom Strings

    Java isn't smart enough to know what you want to do when you pass an array into the println() method. Not every array is an array of Strings, so it's not clear what printing an array out means....
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4