Search:

Type: Posts; User: vortexnl

Search: Search took 0.09 seconds.

  1. How do I make the Robot class hold a key down for a specified amount of time?

    When I use the keyPress() method of the robot class, I notice that it enters the key quite rapidly, but I would like to hold down a key for a specified time, is this possible?
    I already tried to run...
  2. Do you need to forward ports to successfully host a server using ServerSocket class?

    This is something I'm kinda thinking about, can a router block the port you are hosting on?
    I'm making an application where everyone is hosting a server that listens for connections.
  3. Re: Sending image through socket server causes image on the other end to be corrupt

    Never mind, I fixed it by using DataInputStream and DataOutputStream
  4. Sending anything other than a .txt file through socket causes the file to be corrupt

    I'm sending an image of about 800 kB through a socket server to a client,

    This is the server code I'm using:



    try
    {
    File myfile = new File("oeh.jpg");
  5. Creating a serverSocket while sonnecting to a socket on the same port

    I want to make a file transfer application for multiple clients, there will not be a server that users will connect to, the application serves as client AND server, every client will have a...
  6. Replies
    9
    Views
    3,025

    Re: Can't understand why Interfaces are there

    Well what I'm thinking about is for example: actionListeners, let's say I add an actionlistener to a button,
    I could just type
    public void actionPerformed(ActionEvent e)
    right? Why would I need...
  7. Replies
    9
    Views
    3,025

    Re: Can't understand why Interfaces are there

    But why did they make that decision that you have to implement an interface to use the action listener? It just doesn't make sense to me.
  8. Replies
    9
    Views
    3,025

    Re: Can't understand why Interfaces are there

    One more question, are there certain things you can not do unless you implement an interface?
  9. Replies
    9
    Views
    3,025

    Re: Can't understand why Interfaces are there

    This is the best comment I've had so far! Thank you good sir!
    I'll invest a few more hours in learning and it'll be ok ;)
  10. Replies
    9
    Views
    3,025

    Can't understand why Interfaces are there

    So I've been searching all over the web what interfaces, and what it comes down to is:
    An interface just says what an object can do, but not how to do it.

    Why would this make me use an...
  11. How does Java manage memory? I got curious after seeing a live profiling session

    So I just found out NetBeans has a great live profiling tool so I can manage all my memory-usage and such.
    What I noticed was my virtual memory going up slowly as I increased the connections to the...
  12. Re: Can't seem to understand why my while loop doesn't exit!

    Ok, I changed my code to this to this:



    public void run()
    {

    System.out.println("Starting run()");

    try
  13. Re: Can't seem to understand why my while loop doesn't exit!

    Putting a print statement in the catch and finally block doesn't do anything for me, it looks like it's working like it should, but I still don't know why the loop keeps looping (I would assume you...
  14. Can't seem to understand why my while loop doesn't exit!

    I'm gonna past a small piece of code that reads data from a socket server coming from flash, and then sends it back to a client, this is the code:



    public void run()
    {
    try
    ...
Results 1 to 14 of 14