Search:

Type: Posts; User: that_guy

Page 1 of 2 1 2

Search: Search took 0.09 seconds.

  1. Replies
    0
    Views
    971

    Somewhere to go

    Alright...

    this is not a programming question per se just yet. I am embarking on my first ever real programming project. My uncle wants me to build my own (or find a way to incorporate many...
  2. Replies
    4
    Views
    1,476

    Re: Create or fire automated ActionEvent

    Trouble = the entire ActionEvent for which this post originates.

    I changed the call to this:


    ActionEvent e = new ActionEvent(this, 1001, null);
    MainGame.grid[toClaim].actionPerformed(e);
    ...
  3. Replies
    4
    Views
    1,476

    Re: Create or fire automated ActionEvent

    thats what I am trying to do. My problem is that I do not know how to successfully create an actionevent object. Here is the calling code:


    public void begin()
    {
    while(true)
    {...
  4. Replies
    4
    Views
    1,476

    Create or fire automated ActionEvent

    Hey all,

    First off, I like to create my own algorithms, its good practice.

    So I am making a simple Tic Tac Toe game and everything works perfectly except...

    When it is the computers turn I...
  5. Thread: T and <T>

    by that_guy
    Replies
    3
    Views
    1,532

    Re: T and

    I don't get it, why isn't it a T?
  6. Thread: T and <T>

    by that_guy
    Replies
    3
    Views
    1,532

    T and

    I am learning generics in my Data Structures class and during the reading I fully understand it but when it comes for me to write my own code and imlement it via a project or assignment, it takes me...
  7. Replies
    3
    Views
    1,460

    [SOLVED] Re: Integer and if statement

    This is what I changed it to and it worked:


    do
    {
    if(done != null)
    list.add(Integer.parseInt(done));
    if(scan.hasNextInt() || scan.hasNext("done"))
    done = scan.nextLine();
    else
  8. Replies
    3
    Views
    1,460

    [SOLVED] Integer and if statement

    I am trying to determine if the user did not input a correct value without throwing an exception.

    I have a String variable, done, which stores the user input and then if it is not storing "done"...
  9. Thread: question

    by that_guy
    Replies
    1
    Views
    1,184

    Re: question

    I liked

    Introduction to JAVA programming, Eigth Edition
    by: Y. Daniel Liang
  10. Replies
    31
    Views
    4,338

    Re: Java Programming Blue J 0_o

    Hey man. Norm has been doing a great job with helping you.

    With the constructors, you are using what is known as method overloading. You are creating multiple constructors within the same class....
  11. Thread: RGB to Hex

    by that_guy
    Replies
    6
    Views
    2,529

    Re: RGB to Hex

    sounds like it might work. how would I implement it?
  12. Thread: RGB to Hex

    by that_guy
    Replies
    6
    Views
    2,529

    Re: RGB to Hex

    Literally I want the user to enter a color like red. Since red is a java recognized color I want the program to convert the string into a color and then find the hexadecimal of that color so I can...
  13. Thread: RGB to Hex

    by that_guy
    Replies
    6
    Views
    2,529

    RGB to Hex

    I am trying to figure out how to get the hexadecimal value from a RGB.

    This is a snippet of my code:


    //where a is the user inputed string of a color, i.e. "red"
    //and where hex is a...
  14. Re: adding text to JLabel during actionPerformed

    ok got it...
    instead of

    Welcome.setText("Welcome " + Field2 + " " + Field1);


    I should have had:

    Welcome.setText("Welcome " + Field2.getText() + " " + Field1.getText());
  15. adding text to JLabel during actionPerformed

    Ok so I want the user to enter their name and age and when they press a JButton the program sends a welcome message to the user "Welcome first name last name"

    here is my code:


    import...
  16. Replies
    3
    Views
    2,122

    Re: Chess game help

    how so? should I do grid layout and just add (I think) 64 squares of black or brown and white? Secondly would I implement an actionListener to this or would I do that for the pieces class?
  17. Replies
    3
    Views
    2,122

    Chess game help

    Hey,

    I am trying to make a chess game (just two players, no computer player just yet) and dont really know where to start. I was thinking a main class to call the other classes, a board class to...
  18. Replies
    18
    Views
    6,235

    Re: Prompt user to repeat

    I would say add an if statement right before the end of the do-while loop.


    if(loop == 9)
    {
    System.out.println("Do you want to go again?\nYes or No";
    Scanner scan = new...
  19. Replies
    5
    Views
    2,385

    Re: Sorting Arrays

    Yes, what Norm said. Your program expects you to enter all 3 of the names first then all three of the scores.

    your program wants the following input:
    Smith
    Jones
    Peterson
    70
    30
    100
  20. Replies
    5
    Views
    2,385

    Re: Sorting Arrays

    First of all your program doesnt ask for user input when inputing the students names and scores. It just expects the user to know what the program wants.

    Your first for loop in decreasingOrder()...
  21. Replies
    3
    Views
    1,429

    Re: best way for I/O

    Ok, well it would only read or write once every time the program is run. The program would kind of be like a log. You know, like "this happened on this date at this time". So if it were all one file...
  22. Replies
    3
    Views
    1,429

    best way for I/O

    Hey, been a long time since I've been on here. Been a long time (I'd say 8 months) since I've truly dealt with java. Before I briefly stopped with it, I never truly grasped file I/O.

    so, whats the...
  23. Replies
    9
    Views
    3,527

    Re: drawString and JTextField

    btw, which borderlayout tutorial are you talking about? there was no link posted with the recommendation, so how would you go around the drawString situation?
  24. Replies
    2
    Views
    3,098

    Re: Matrix Program

    hmmmm......

    how about try changing your for loops:


    for(int i=0;i<4;i++){
    for(int j=0;i<4;j++){
    a[i][j] = mad.nextInt();
    }
    }
  25. Replies
    9
    Views
    3,527

    Re: drawString and JTextField

    hahahaha now its worse (or so i think)...

    i changed the labels to Jlabels which created errors cause apparently jlabels dont have the setAlignment() method so i changed those method calls to...
Results 1 to 25 of 49
Page 1 of 2 1 2