Type: Posts; User: Cornix

Page 1 of 20 1 2 3 4

Search: Search took 0.52 seconds.

  1. Re: how to check if someone is trying to connect to you

    If you have a ServerSocket opened then the accept method can be used to accept an incoming connection. When you call accept on the ServerSocket the method will block until a Client has tried to...
  2. Replies

    Java-Agents and Communication

    Hi guys,

    I am currently developing a java agent using the Instrumentation API. (link: In case somebody doesnt...
  3. Replies

    Re: Java 2d game development

    We have practical courses in university where we let groups of students program video games with java, they usually use one of the following:

    bare basics, a lot of low-level work but most...
  4. Replies

    Re: Changing a frame to JFrame

    You do custom drawing in your code. You should read up on some Swing tutorials about custom drawing to learn how to do it correctly. The way you do it is not quite right for a JFrame, for all...
  5. Replies

    Re: Method is not returning array

    An array is an object. Unless you create the array with the "new" keyword your variable will point to the null reference. I dont see you using the "new" keyword in combination with your...
  6. Replies

    Re: Is it the 3rd answer

    Why do you not just compile and execute the program? You will see what the output is then.
  7. Replies

    Re: how to get the "stream" from twitch?

    Yes of course.
    It is a nomral website like any other. But you have to know the protocol used and how to use it yourself, you also need to know how the stream is encoded and how you can extract image...
  8. Re: Transferring co-ordinates from a design program, to an array in Java?

    You make it too simple. Java is not a human, it can not read an excel document through the GUI that excel provides, it will read the document in bytes. Open an excel document in a plain text editor...
  9. Replies

    Re: JavaFX - progressIndicator in FXController

    Thats a really bad way of "waiting". Instead of burning CPU cycles like mad how about calling Thread.sleep(int) to make the thread wait for a certain amount of time?
  10. Replies

    Re: Inheritance & Polymorphism

    Just by quickly glancing over it I can see several problems with the code. There are characters missing and such.
    The error about "illegal character: \8220" probably comes from the fact that you...
  11. Replies

    Re: Exception Handling and Text I/0

    Your problems come from incorrectly used syntax. If it says ".class expected" that means that your curly brackets are off and code that should be within a class is NOT within a class; perhaps because...
  12. Re: Drawing a graph based on stock values from 2 ArrayLists

    If you want to use Swing for custom painting there are plenty of tutorials online. The basics are simple, you create your own class that extends JPanel (or JComponent) and you override both the...
  13. Re: Drawing a graph based on stock values from 2 ArrayLists

    Well you have to choose a library for drawing first. You could do it with Swing for example, or perhaps with OpenGL. It really depends on what you want to do and what you need. Then, when you have...
  14. Re: Drawing a graph based on stock values from 2 ArrayLists

    That is still not a question. Nobody here is going to do this for you, but if you tried already and ran into a problem then you can tell us what your problem is and perhaps we can guide you in the...
  15. Re: Drawing a graph based on stock values from 2 ArrayLists

    What is your question?
  16. Replies

    [SOLVED] Re: Getting a object from a map

    Are you sure you pass a long to your get method? Perhaps it is cast to an int instead.
    Try this:

    Items it = map1.get(Long.valueOf(10060120));
  17. Replies

    Re: problem while maximizing the jFrame

    That code does not show anything about how your components are set up and what layout you use.
    I would guess you dont use any layout or you use a layout that does not position your components...
  18. Replies

    [SOLVED] Re: Easy way to load images using for loop

    If you want to have a String that goes like this:

    Then all you have to do in java is concatenate your Strings:

    "Piece" + number + ".png"
  19. Replies

    Re: Java Scanner? How do I get this to work?

    Thats not correct. You dont convert anything. Your Scanner is still a Scanner and will always be a Scanner. What you do is to call a method of your Scanner object; this method returns an int value,...
  20. Re: can't figure out how to compare a int to a empty string to input an error message to user

    Oh, my bad, the methods name is "parseInt(...)" instead of "parseString(...)".
  21. Replies

    Re: Java Scanner? How do I get this to work?

    You have a variable called "age", your variable is of type "Scanner" as you defined in the line: "Scanner age = new Scanner(;". You try to compare your variable of type "Scanner" with a...
  22. Re: can't figure out how to compare a int to a empty string to input an error message to user

    If you read input as a String you can find out whether the String can be parsed to an integer or not by doing the following:

    int inputAsInt;
    try {
    inputAsInt =...
  23. Replies

    Re: Can't draw very far in a JPanel

    First of all: Dont override the paint(Graphics) method, override the paintComponent(Graphics) method instead. Overwriting the paint(Graphics) method is discouraged and not recommended.

    To your...
  24. Re: JSF DefaultManagedThreadFactory, I'm overlooking something

    How about using an ExecutorService with a CachedThreadPool?

    This is how you would create an ExecutorService:

    ExecutorService thread = Executors.newCachedThreadPool();
    Note that one...
  25. Re: How to add text to a single text field from many buttons ??

    See post #2:
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4