Search:

Type: Posts; User: Fubarable

Page 1 of 4 1 2 3 4

Search: Search took 0.10 seconds.

  1. Replies
    2
    Views
    2,401

    Re: Java Assignment Question

    cross-posted: Java Assignment Question
  2. Re: How would I create this solution algorithm using pseudocode? Im stuck..

    Cross-post: How would I create this solution algorithm using pseudocode?
  3. Replies
    11
    Views
    4,075

    Re: Should GUI Panels be Singletons?

    OK, but the data itself will be held by the model. The GUI only provides a view to the data and nothing more.



    No. It needs access to the model via the control. Again, the JPanels above only...
  4. Replies
    11
    Views
    4,075

    Re: Should GUI Panels be Singletons?

    Below is another example uploaded as a .zip file although in reality it's a runnable .jar file:

    1437

    A single file example of it is posted below:



    import java.awt.*;
    import...
  5. Replies
    11
    Views
    4,075

    Re: Should GUI Panels be Singletons?

    You have only one model object, and as mentioned by copeg above, you hook it up to the view object via the control. If set up well, this can often be done with just a few lines of code in the main...
  6. Replies
    11
    Views
    4,075

    Re: Should GUI Panels be Singletons?

    You have the usual problems that people complain about with singletons -- risk of tight coupling, difficulty in mocking, difficulty in testing, risk of more than one instance if more than one class...
  7. Replies
    132
    Views
    72,298

    Sticky: Re: 500 Ways to Print 1 to 10

    Or even briefer:



    public static final byte[] NUMBER_BYTES = {0x31, 0x20, 0x74, 0x6f, 0x20, 0x31, 0x30};
  8. Replies
    5
    Views
    2,489

    Re: Java Programming Exercise

    Always, ALWAYS, enclose all blocks in curly braces, even one line blocks. This includes all if blocks and else blocks.

    Doing this will solve your problem.
  9. Re: Having trouble loading variables from a file

    You should simplify your problem to solve it. Just use a simple text file and a very simple Java program that reads in the text file into say a collection of Strings. If and when that works, move to...
  10. Re: Having trouble loading variables from a file

    I mean using printStackTrace method of Exception:



    }catch(Exception e){
    e.printStackTrace();
    }
  11. Re: Having trouble loading variables from a file

    Your catch block does not post informative information. If you instead print a stacktrace, what errors do you see? Also, are you sure that you want to use files? You might consider using resources...
  12. Thread: hi guys

    by Fubarable
    Replies
    2
    Views
    1,406

    Re: hi guys

    Welcome. Most of us don't change diapers though. Best of luck!
  13. Re: is it possible to extends java class with another class from different package?

    I would recommend that you not use the default package (meaning that it is in no package at all), that you put all classes in appropriate packages, and then give it a try again. Please let us know if...
  14. Replies
    132
    Views
    72,298

    Sticky: Re: 500 Ways to Print 1 to 10

    public class OneToTen {

    public static final byte[] NUMBER_BYTES = {
    0x4f, 0x6e, 0x65, 0x2c, 0x20, 0x54, 0x77, 0x6f, 0x2c, 0x20, 0x54,
    0x68, 0x72, 0x65, 0x65, 0x2c, 0x20,...
  15. [SOLVED] Re: the output is just a blank frame... no menu bar is present.. plz help me out..

    First look for obvious problems, such as: Where do you add the JMenuBar to the JFrame? JFrame has a method for this, setJMenuBar(...), and I don't see it being called anywhere.

    I suggest that you...
  16. Re: How do I create a if statement that accepts only Integers?

    It's a common mistake to try to find a specific example of the exact code you're looking for. Rather Just study the basic Java tutorials and the API related to this issue and you'll learn how to code...
  17. Re: is it possible to extends java class with another class from different package?

    We can't read minds, and so if you need our help, you'll need to tell us more. Likely the error is not due to classes being in different classes, but honestly given what you've posted, I have no idea...
  18. Replies
    3
    Views
    1,344

    Re: need to know how the code is running

    This is a double post of an already active question: http://www.javaprogrammingforums.com/java-theory-questions/16777-help-needed-know-how-code-running.html#post71106

    If I were a moderator on this...
  19. Replies
    2
    Views
    1,337

    Re: Increment operators on char

    c = c + 1; isn't necessarily in error per se. It's just when you add a char to an int, you get an int, so for this to work you must cast the result as a char:



    c = (char) (c + 1); // this works...
  20. Re: How do I create a if statement that accepts only Integers?

    Surely you don't want us to simply do your work for you right? Usually it's best for you to attempt to solve this yourself first, and then if that doesn't work, post your code attempt with specific...
  21. Re: arranging components in a vertical manner in a jpanel?

    Consider using nested JPanels with the outer JPanel using BorderLayout. It holds a JPanel on its WEST side that can use BoxLayout, and then it holds another JPanel in the BorderLayout.CENTER position...
  22. Re: Challenging Java Question: Test your Java skill by grouping these terms

    No, it takes lack of laziness. Please go do your own grunt work. Don't just dump it in this or other forums.
  23. Re: Hey! can anyone help me . i cant find an error (beginner)

    A NullPointerException (NPE) means that you are trying to use a variable that has not been initialized yet. The exception will tell you which line of your code is causing the error, and so you'll...
  24. Re: is it possible to extends java class with another class from different package?

    So if I am understanding you correctly, you are asking if you can create a class that inherits from another class that is located in a different package. The answer is "yes" as long as that other...
  25. Thread: Java Swing

    by Fubarable
    Replies
    1
    Views
    1,234

    Re: Java Swing

    Most here would love to help you, but all you've done so far is post your requirements. No one is going to do this for you of course, but to be able to help you, we must see a clear answerable...
Results 1 to 25 of 83
Page 1 of 4 1 2 3 4