Search:

Type: Posts; User: GoodbyeWorld

Page 1 of 7 1 2 3 4

Search: Search took 0.10 seconds.

  1. How to get the java equivalent of C++ const

    How to you make sure that a variable passed to a method isn't altered by the method? I know in C++ you can do something like


    void aMethod(const Object &item)
    {

    ........

    }
  2. Re: JTextPane not printing components inside it

    JTextPane has a method to add components and icons and stuff and allows styles to create tables. It also has a print method. However, when it prints it

    1.) Removes the tables and non-text stuff...
  3. Re: JTextPane losing a table when printing

    I have looked on Google and can't find a solution to the issue. I think I may have found one solution to it that somebody posted, but, alas, the link is dead. :(

    I cannot find a solution online...
  4. Replies
    8
    Views
    1,017

    Re: What is wrong with my code?

    I see that you are passing userB to the function but you never use userB.

    I'm assuming that the type that you would need, as he said above, is BigInteger.
  5. Replies
    6
    Views
    710

    Re: What's wrong in this code?

    Main.java


    import java.io.File;
    import java.io.IOException;
    import java.io.FileNotFoundException;


    public class Main
    {
  6. JTextPane not printing components inside it

    As I couldn't find a way to do the printing of multiple items on one page, I decided to test out my idea. I found that I could have a table in a JTextPane.

    However, whenever I got to print, my...
  7. Re: Trying to figure out how to print multiple things on same page

    Still no reply from him. Maybe someone here can help. I can tell him I got help. I'm not understanding how he wants me to do it without using PrinterJob (which does it on separate pages).

    I'm...
  8. Re: Trying to figure out how to print multiple things on same page

    He still hasn't replied yet. It's got to be something really simple yet I can't figure it out. I have looked and looked. There seems to be no way to get the Graphics object.

    It is driving me...
  9. Trying to figure out how to print multiple things on same page

    Ok, I heard that java doesn't really have any easy way to get it to say, call print on a JTable and a JTextArea and, even if there IS room, to put them on the same page. It always seems to go to a...
  10. Replies
    3
    Views
    1,577

    Re: How to make a custom swing component

    I checked the source code of the JRadioButton, JToggleButton, and AbstractButton classes. There doesn't seem to be anything in the paint methods that deal with reshaping the border to be...
  11. Replies
    3
    Views
    1,577

    How to make a custom swing component

    I tried to make a custom swing component. I managed to get it to draw it right. However, there is a problem. It still has a rectangle border. I want it to have the border of the shape passed to...
  12. Replies
    1
    Views
    2,132

    Re: Urgent - Please help to form code

    http://www.javaprogrammingforums.com/java-theory-questions/35826-java-urgent-help.html#post139476
  13. Replies
    6
    Views
    2,132

    Re: Java Urgent Help

    http://www.javaprogrammingforums.com/whats-wrong-my-code/35827-urgent-please-help-form-code.html#post139473
  14. Re: How do you play wma or mp3 files in java?

    I was asking, as it seems that they don't cover .wma or even .mp3 files in the JavaSE Sound APIs, is there a third party package that can do it?

    If so, do you have any idea what that third party...
  15. Re: Two questions: setting an image icon and closing up a game

    Not sure what you mean on the first one. You can either do a picture that can be clicked as a JButton that has an icon as its content or you can have a JLabel that has an icon as a content and that...
  16. How do you play wma or mp3 files in java?

    I was looking at the Sound API pages in the java tutorials. I was planning to use it to run wma files.

    Fortunately, for me, I found, soon into the tutorials, that these API DON'T support the type...
  17. Re: Getting extra lines when saving and loading into a JTextArea

    So, the "\n" is cross platform already.

    Also, when you say "writing to disk", do you mean the hard drive, and hence that I shouldn't use JTextArea write() or whatever it was called to do it?
    ...
  18. Re: Getting extra lines when saving and loading into a JTextArea

    Thanks. So, what do you use then for a cross-platform line break thing? I heard that "\n" was only for Windows or something. That it wouldn't work on all systems.

    (By the way, I did get it...
  19. Getting extra lines when saving and loading into a JTextArea

    I have made a SSCCE, it only has what I need. The problem happens to be replicated in this section, so my hunch was correct of where the problem was coming from. I think I might know the issue.
    ...
  20. Re: Getting moving rectangles to attach to each other

    So, you got it to draw the food then? That was the issue in your other thread.

    Anyway, all your head would need to care about was the one after it. The same thing for the one after the head. ...
  21. [SOLVED] Re: Having trouble with a JComboBox in a JFileChooser. Issue with removing elements and items.

    I don't know what a SSCCE is. I thought it was a program that was a short as could be made that included the problem, and, if possible, compiled.


    This one doesn't have a main method, true. I...
  22. [SOLVED] Re: Having trouble with a JComboBox in a JFileChooser. Issue with removing elements and items.

    I don't quite get why it needs to have Object arrays as elements. However, it does have all of the items it should, it's just not displaying them.

    It appears to be in the method...
  23. Replies
    33
    Views
    2,783

    Re: Setters and getters

    public class TestClass
    {


    public static void main(String[] args)
    {

    PizzaMenu pm = new PizzaMenu();

    // call methods and stuff with pm object
  24. [SOLVED] Having trouble with a JComboBox in a JFileChooser. Issue with removing elements and items.

    I have no idea quite what it's doing in the ComboBoxModel section part with all the arrays of Object. I have tried what I thought should and have tried removing all the elements, hoping that would...
  25. Replies
    6
    Views
    2,245

    Re: Programmer needed for small GUI project

    I think I can do most of that stuff. (The weird thing on the JScrollBar will be a bit trickier but I've done something like that too where I had the scroll bar be a snake icon instead and could use...
Results 1 to 25 of 155
Page 1 of 7 1 2 3 4