Search:

Type: Posts; User: Cornix

Page 1 of 20 1 2 3 4

Search: Search took 0.10 seconds; generated 16 minute(s) ago.

  1. Replies
    4
    Views
    899

    Re: Java - Socket Programming

    The message says it all. The address you are trying to use is already being used by an other Socket. Each address can only be used once at a time.
    Perhaps you didnt kill your JVM properly when...
  2. Replies
    3
    Views
    1,097

    Re: CMD WONT COMPILE MY .JAVA FILES

    Class names start with capital letters and the dot '.' is not a valid character for a class name.
    Your class might look like this:

    public class HelloWorld {
    public static void main (String...
  3. Thread: Java for CUDA?

    by Cornix
    Replies
    3
    Views
    1,891

    Re: Java for CUDA?

    No, it wouldnt. A graphics card can not do these things at all, it would be a lot slower actually.
    GPU's are good when doing simple floating point arithmetics which are massively parallel. Most java...
  4. Re: Java Arrays - Entering Lists only let me enter 2 numbers

    What you say in your description of your program and what your program does are 2 completely different things.
    Firstly, you dont use any lists at all, you are using arrays. And it will let you enter...
  5. Replies
    4
    Views
    1,159

    Re: Java reverse order using pointers

    There are no pointers in java.
    What you have in java are variables.

    In your case there are 4 variables in your program:
    The variable "sc" of type Scanner, the variable "name" of type String and...
  6. Re: Java GUI Problem, I am having trouble getting my TextArea to resemble console output.

    Of course.
    Each time your timer is activated your counter is set to 0. So you will obviously always print the first element.

    You have to keep your counter variable as a field outside of the timer.
  7. Replies
    4
    Views
    1,012

    Re: switch case , check range

    You dont.
    A switch case can only take constant values.

    What you want is probably an if-then-else statement.
  8. Re: How to take my java application and run it with a GUI instead of the IDE

    As I said before, look up some tutorials for GUI libraries. Which one you take is up to you but I would recommend Swing for something as simple as this.
    You will need to read a few tutorials first...
  9. Replies
    2
    Views
    2,025

    Re: Problem with JTextPane indentation

    This works for me, perhaps it will help you:

    import java.awt.EventQueue;

    import javax.swing.JFrame;
    import javax.swing.JTextPane;
    import javax.swing.text.AttributeSet;
    import...
  10. Re: Variable from superclass using in JFrame class

    There are several ways of doing this.

    But first of all, your JFrameTesting class is NOT a superclass for your MyJFrame class. The MyJFrame class is an inner class of your JFrameTesting class....
  11. Replies
    10
    Views
    1,220

    Re: Help With BalloonTester

    The comment is clearly wrong as you can read from the method:


    public void inflate(double radius)
    {
    savedRadius = savedRadius + radius;
    }
    The balloons radius is saved...
  12. Replies
    10
    Views
    1,220

    Re: Help With BalloonTester

    You try to inflate it with 0.0, what do you think is going to happen?
  13. Re: How to take my java application and run it with a GUI instead of the IDE

    You have to pick one of many GUI libraries and create an application window for it.
    I would guess that the most widely used GUI library for java is Swing which is distributed by oracle.

    Google...
  14. Replies
    10
    Views
    1,220

    Re: Help With BalloonTester

    The error message is quite clear:

    The method you tried to call requires a double argument and you were giving it no arguments.
    Give the method a double as an argument and this error will be gone.
  15. Re: SwingWorker implemented - how to do additional GUI processing?

    There are probably many different kinds of properties and you should check within your PropertyChangeListener which particular property was changed.
    Perhaps the documentation can tell what kinds of...
  16. Re: SwingWorker implemented - how to do additional GUI processing?

    I am not 100% sure how you fire the event so perhaps what I said earlier, that your event is fired on the SwingWorker was not true. It is still a good practice though to put the code into an...
  17. Re: SwingWorker implemented - how to do additional GUI processing?

    Classes dont run on threads. Classes have absolutely nothing to do with threads.
    Objects dont run on threads either. Bot these things are completely disconnected.

    Each thread can run the methods...
  18. Replies
    6
    Views
    1,135

    Re: programmimng problem or bug?

    You should still google for the EDT or EventDispatchThread.
    All Swing applications must be started on the EDT (and NOT your main thread) and every update to any Swing component must also happen on...
  19. Re: SwingWorker implemented - how to do additional GUI processing?

    You have to do what your propertyChange listener does within the EDT since you call repaint(). I dont know if this is the only issue but try it and come back if you still need help.
  20. Re: Constantly changing color of World Map Image in Java

    Well then why dont you take a complete image of a world map and cut each country out by hand with the help of an image editing program. You can then save each country as a separate image file and...
  21. Replies
    3
    Views
    1,465

    Re: JPanel Ontop for JButton

    May it be that what you really want is a dialog window popping up? If that is the case look at the JDialog class or the JOptionPane for simple dialogs.

    Other then that you could add your JPanel as...
  22. Thread: State diagram

    by Cornix
    Replies
    2
    Views
    857

    Re: State diagram

    If I had to guess I would say this refers to an UML diagram.
    For more information google for UML state diagrams.


    Without context I can only guess that member variables of objects (fields) are...
  23. Re: Constantly changing color of World Map Image in Java

    What you should do really depends on much more detailed specifics of your program.
    First of all, what kind of graphics library do you want to use? AWT? Swing? SWT? OpenGL? Or any others?
    Then, how...
  24. Re: Constantly changing color of World Map Image in Java

    This is a very broad question.
    You could, for example, change the pixels RGB values. Or use any of one million other methods of doing it...
  25. Replies
    32
    Views
    4,191

    Re: Secure Java Files

    Oh yeah? And who is holding them back from decompiling your custom class loader? You want to have an additional class loader to load your encrypted class loader?
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4