Search:

Type: Posts; User: mstabosz

Page 1 of 4 1 2 3 4

Search: Search took 0.23 seconds.

  1. Re: Socket program that worked in the past no longer working, cannot open socket.

    Ok. Attaching a simple WindowListener got this all working correctly. I'm not crazy about the clutter caused by the 6 other methods the interface requires me to implement, but it is what it is. ...
  2. Replies
    5
    Views
    171

    Re: NullPointerException on JButton.setIcon.

    Ok got it working. Thanks Norm and Copeg.
  3. Replies
    5
    Views
    171

    Re: NullPointerException on JButton.setIcon.

    I thought the statement JButton[] handButton = new JButton[13]; instantiated them. I guess I was wrong. I always screw up with object array. Blech. So I oughtta throw something like handButton[i]...
  4. Replies
    5
    Views
    171

    NullPointerException on JButton.setIcon.

    Wasn't sure which subforum to put this in. It feels like it crosses a couple different aspects of Java.

    So I have these two classes that I wrote a few months back. The Card class represents a...
  5. Re: Socket program that worked in the past no longer working, cannot open socket.

    Hmm. Is there a better way? The System.exit(0) statement is inside that catch block. If it hits that, there are no other statements to execute, so it wouldn't do anything. But if I got rid of the...
  6. Re: Socket program that worked in the past no longer working, cannot open socket.

    Hmmm...

    Earlier today tried the May export and the (newer) October export on a third computer and they both worked. Just now tried both on this computer, and they both worked. Then closed them...
  7. Re: Socket program that worked in the past no longer working, cannot open socket.

    XAMPP I think is only using 80 and 443. But I changed around to some other arbitrary port numbers and still got the same thing. Netstat doesn't show port 10,000 as being in use, so you're probably...
  8. Re: Socket program that worked in the past no longer working, cannot open socket.

    Ooof. Forgot I posted this, and been too busy to reply back. Sorry about that.



    You only need the server portion, which I've pasted above, to see the problem. There's an Address class...
  9. Socket program that worked in the past no longer working, cannot open socket.

    I wrote this program back in May that makes use of networking. It's a smallish program that is comprised of 2 parts, a client and a server. The server just receives information from a single...
  10. Re: My code is skipping my for loop altogether and ignoring my array input.

    No, but it's a lot more reliable than using ==

    I think that == sometimes works with Strings but not always so you shouldn't count on it.

    You can also use .compareTo() and...
  11. Re: Did you ever find yourself unable to solve what should be a simple programming problem?

    Indeed. For this particular problem, I left my computer and went off to the gym for my daily exercise, a process which takes about 90 minutes (30 minutes travel to and from the gym, and an hour on...
  12. Replies
    5
    Views
    245

    Re: Java test questions

    Number 1 looks like a good candidate for recursion, since it involves factorials. But you can probably do it with a for loop that counts down. In a nutshell, the question is asking: "If given the...
  13. Replies
    4
    Views
    115

    Re: help me please

    Well, a submit button, on something like a GUI, would be added as a JButton object. JButton jbtSubmit = new JButton("Submit"), then use the add() method in the JFrame class to add that to a frame. ...
  14. Re: how to solve this question ? please help me

    The output depends on the input. If you wrote this, then gave a height and width of 4, you would get an area of 16 for the square and 8 for the triangle.
  15. Re: how to solve this question ? please help me

    What question?
  16. Replies
    6
    Views
    662

    Re: Programming books that inspired you

    Well when I took my very first programming course (in C)back in the Fall of 1999, I broke down from the shell shock of the experience and the lousy quality of the instruction. So I dropped the...
  17. Replies
    3
    Views
    681

    Re: Created my first Java program

    Seems unnecessary. Couldn't you just get one of those drinking bird toys to press a button over and over?
  18. Re: how to solve this question ? please help me

    Actually, now that I look at the assignment as given:

    Create an abstract class called GeometricFigure. Each figure includes a height, a width, a figure type and an area. Include an abstract method...
  19. Replies
    3
    Views
    186

    Re: who can help me write this program?

    These are weird specifications. Why would a Rectangle class have a "getCircumference" method? Rectangles have perimeters, not circumference. Your Rectangle class is off to a good start. It looks...
  20. Replies
    3
    Views
    186

    Re: who can help me write this program?

    What have you got so far?
  21. Re: how to solve this question ? please help me

    First off, please use code tags for your code.

    Secondly, I'm not sure where you're going with this. It looks like you declared the Triangle class twice.

    Third, the statement public...
  22. Did you ever find yourself unable to solve what should be a simple programming problem?

    Like, not even something terribly mind bendingly difficult. I mean some real basic stuff. I don't mean that you can't figure out the syntax of a certain command or function; that's easy enough to...
  23. Replies
    4
    Views
    120

    Re: School project

    Midnight21, I'm sorry you're having trouble. Programming, I find, is a lot more difficult than most people expect. There's some real shell shock when you get your first exposure to it. But our...
  24. Replies
    7
    Views
    146

    Re: Help for Terminal Exams................

    Yeah like Greg said, your loop logic is wrong. If you declare an array of size 5, then its available elements are at 0, 1, 2, 3, and 4. If you loop through with something like for(i=0; i<=5; i++),...
  25. Re: how to solve this question ? please help me

    What do you mean? Did my code not work? Or did you write something and you're having trouble with it? If you post your code (remember to use code tags) and we'll see what we can do.
Results 1 to 25 of 96
Page 1 of 4 1 2 3 4