Search:

Type: Posts; User: Cornix

Page 1 of 20 1 2 3 4

Search: Search took 0.26 seconds.

  1. Replies
    3
    Views
    157

    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?
  2. Replies
    20
    Views
    150

    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...
  3. Replies
    1
    Views
    72

    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...
  4. 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...
  5. 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...
  6. 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...
  7. Re: Drawing a graph based on stock values from 2 ArrayLists

    What is your question?
  8. Replies
    2
    Views
    57

    [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));
  9. Replies
    10
    Views
    258

    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...
  10. Replies
    2
    Views
    52

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

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

    "PieceNUMBER.png"
    Then all you have to do in java is concatenate your Strings:

    "Piece" + number + ".png"
  11. Replies
    4
    Views
    186

    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,...
  12. 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(...)".
  13. Replies
    4
    Views
    186

    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(System.in);". You try to compare your variable of type "Scanner" with a...
  14. 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 =...
  15. Replies
    2
    Views
    67

    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...
  16. 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...
  17. Re: How to add text to a single text field from many buttons ??

    See post #2:
  18. Re: JSF DefaultManagedThreadFactory, I'm overlooking something

    I dont know anything about a ManagerThreadFactory, but perhaps if you explain what you try to do with it maybe I could recommend an alternative API.
  19. Re: How to add text to a single text field from many buttons ??

    1) Find out when a button is pressed, for example with an ActionListener registered at each button
    2) Find out which button was pressed and what kind of letter you want to add, there are numerous...
  20. Replies
    1
    Views
    52

    Re: KeyListener doesn't work

    First of all, you dont start your application on the EventDispatcherThread (EDT) which can cause all kinds of problems. If you dont know what the EDT is I would recommend doing some online research....
  21. Replies
    3
    Views
    86

    Re: Collections.sort() not working for me

    The error message shows you that you were trying to pass an array to the sort method. However, the sort method only accepts Collection's. If you want to sort an array call Arrays.sort(...).
  22. Replies
    4
    Views
    62

    Re: Boolean Statement not working

    Where do you set the value of "TICK"? I can not find it. And how do you know that WIN and TICK have the same value?
  23. Thread: file handaling

    by Cornix
    Replies
    5
    Views
    98

    Re: file handaling

    Buy a book about it and read it. Then, try what you have read yourself to get practical experience.
  24. Re: Program to scrape all title tags from large sites

    What you say is right, but since he wants to write everything to disk he will still be limited in speed by that. The disk can only write one thing at a time and should probably be slower then the...
  25. Re: closing the JDialog window when I press a JButton

    To close a window, be it a JFrame or a JDialog you call the dispose() method.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4